/**
 * Angel Lust - Size Guide & Fit Advice Frontend Styles
 * Aesthetic: Minimal, Modern, Clean, White & Light Pastel Pink Fashion Palette
 */

:root {
  --alsg-accent: #ff5b6e;
  --alsg-accent-hover: #e23d53;
  --alsg-bg-pink: #fff4f6;
  --alsg-border-pink: #f9d3dc;
  --alsg-text: #2d3748;
  --alsg-font-size: 13px;
  --alsg-transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Wrapper */
.alsg-size-guide-wrap {
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: var(--alsg-font-size);
  line-height: 1.4;
  vertical-align: middle;
  position: relative;
  box-sizing: border-box;
}

/* Placements */
.alsg-size-guide-wrap[data-placement="label_inline"] {
  margin-left: auto;
  float: right;
}

/* In case of flex parent in modern themes (Blocksy, Flatsome, etc.) */
.variations .label,
.variations th,
.variations td.label,
.ct-attribute-label {
  position: relative;
}

.alsg-size-guide-wrap[data-placement="before_swatches"] {
  display: flex;
  margin-bottom: 8px;
  margin-top: 4px;
  width: 100%;
}

.alsg-size-guide-wrap[data-placement="after_swatches"] {
  display: flex;
  margin-top: 10px;
  margin-bottom: 6px;
  width: 100%;
}

/* General Link Styling */
.alsg-size-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--alsg-text) !important;
  text-decoration: none !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--alsg-transition);
  outline: none;
}

.alsg-size-guide-link:hover,
.alsg-size-guide-link:focus-visible {
  color: var(--alsg-accent) !important;
  text-decoration: none !important;
}

/* Icon */
.alsg-size-guide-link .alsg-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--alsg-accent);
  transition: var(--alsg-transition);
}

.alsg-size-guide-link:hover .alsg-icon {
  stroke: var(--alsg-accent-hover);
  transform: scale(1.08);
}

/* Arrow */
.alsg-size-guide-link .alsg-arrow {
  display: inline-block;
  font-size: 14px;
  color: #a0aec0;
  transition: transform 0.2s ease, color 0.2s ease;
  line-height: 1;
  font-weight: 400;
}

.alsg-size-guide-link:hover .alsg-arrow {
  color: var(--alsg-accent);
  transform: translateX(2px);
}

/* STYLE 1: Minimal Clean (Editorial Underline) */
.alsg-style-minimal_clean .alsg-size-guide-link {
  padding: 2px 0;
  position: relative;
}

.alsg-style-minimal_clean .alsg-text {
  position: relative;
}

.alsg-style-minimal_clean .alsg-text::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--alsg-border-pink);
  transition: background-color 0.2s ease, transform 0.2s ease;
  transform-origin: left;
}

.alsg-style-minimal_clean .alsg-size-guide-link:hover .alsg-text::after {
  background-color: var(--alsg-accent);
}

/* STYLE 2: Soft Pink Pill */
.alsg-style-soft_pill .alsg-size-guide-link {
  background-color: var(--alsg-bg-pink);
  border: 1px solid var(--alsg-border-pink);
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 1px 3px rgba(255, 91, 110, 0.04);
}

.alsg-style-soft_pill .alsg-size-guide-link:hover {
  background-color: #ffffff;
  border-color: var(--alsg-accent);
  box-shadow: 0 3px 8px rgba(255, 91, 110, 0.12);
  transform: translateY(-1px);
}

/* STYLE 3: Delicate Outline */
.alsg-style-delicate_border .alsg-size-guide-link {
  background-color: #ffffff;
  border: 1px solid var(--alsg-border-pink);
  border-radius: 4px;
  padding: 4px 10px;
}

.alsg-style-delicate_border .alsg-size-guide-link:hover {
  background-color: var(--alsg-bg-pink);
  border-color: var(--alsg-accent);
  transform: translateY(-1px);
}

/* Blocksy Theme & Swatches Alignment Tuning */
.variations tr {
  position: relative;
}

.variations .label label {
  display: inline-block;
  vertical-align: middle;
}

/* When placed inline with label inside table or flex */
.alsg-flex-label-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  flex-wrap: wrap;
  gap: 8px;
}

/* Drawer / Modal Lightbox Styling */
.alsg-modal-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.alsg-modal-drawer.alsg-active {
  visibility: visible;
  opacity: 1;
}

.alsg-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 21, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.alsg-modal-container {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 2;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.alsg-modal-drawer.alsg-active .alsg-modal-container {
  transform: translateX(0);
}

/* Drawer Header */
.alsg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--alsg-border-pink);
  background: var(--alsg-bg-pink);
}

.alsg-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}

.alsg-modal-title .alsg-icon {
  width: 17px;
  height: 17px;
  stroke: var(--alsg-accent);
}

.alsg-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #718096;
  transition: all 0.2s ease;
}

.alsg-modal-close:hover {
  background: rgba(255, 91, 110, 0.12);
  color: var(--alsg-accent);
}

.alsg-modal-close svg {
  width: 18px;
  height: 18px;
}

/* Drawer Body & Iframe */
.alsg-modal-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #fafafa;
}

.alsg-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #718096;
  font-size: 13px;
  background: #ffffff;
  z-index: 1;
  transition: opacity 0.25s ease;
}

.alsg-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--alsg-border-pink);
  border-top-color: var(--alsg-accent);
  border-radius: 50%;
  animation: alsg-spin 0.75s linear infinite;
}

@keyframes alsg-spin {
  to {
    transform: rotate(360deg);
  }
}

.alsg-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Drawer Footer */
.alsg-modal-footer {
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #edf2f7;
  text-align: center;
}

.alsg-modal-external-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--alsg-accent) !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--alsg-bg-pink);
  border: 1px solid var(--alsg-border-pink);
}

.alsg-modal-external-btn:hover {
  background: var(--alsg-accent);
  color: #ffffff !important;
}

.alsg-modal-external-btn svg {
  width: 14px;
  height: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .alsg-modal-container {
    max-width: 100%;
  }

  .alsg-size-guide-wrap[data-placement="label_inline"] {
    margin-left: 0;
    float: none;
  }
}
