/* ============================================================
   FHEERA — Size Chart Modal
   Deploy to: /fheera/assets/css/size-chart-modal.css
   ============================================================ */

/* ── Base overlay ─────────────────────────────────────────────── */
.sc-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sc-modal[hidden] {
  display: none;
}

/* Opening animation state: backdrop + panel slide up */
.sc-modal.is-entering .sc-modal__backdrop {
  animation: scBackdropIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sc-modal.is-entering .sc-modal__panel {
  animation: scPanelIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Closing animation state */
.sc-modal.is-leaving .sc-modal__backdrop {
  animation: scBackdropOut 200ms ease-in both;
}
.sc-modal.is-leaving .sc-modal__panel {
  animation: scPanelOut 220ms ease-in both;
}

/* ── Backdrop ─────────────────────────────────────────────────── */
.sc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 7, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Panel ────────────────────────────────────────────────────── */
.sc-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  background: #0e0e0d;
  border: 1px solid rgba(255, 255, 255, 0.07);

  width: min(92vw, 980px);
  max-height: none;

  overflow: hidden;

  scrollbar-width: none;
}

.sc-modal__panel::-webkit-scrollbar {
  width: 3px;
}
.sc-modal__panel::-webkit-scrollbar-track {
  background: transparent;
}
.sc-modal__panel::-webkit-scrollbar-thumb {
  background: rgba(184, 151, 90, 0.3);
  border-radius: 2px;
}

/* ── Header ───────────────────────────────────────────────────── */
.sc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 2rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  background: #0e0e0d;
  z-index: 2;
}

.sc-modal__eyebrow {
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(184, 151, 90, 0.8);
  margin: 0 0 0.3rem;
}

.sc-modal__title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.6rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.2;
}

/* ── Close button ─────────────────────────────────────────────── */
.sc-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
  margin-top: 0.15rem;
}

.sc-modal__close:hover {
  border-color: rgba(184, 151, 90, 0.5);
  color: rgba(184, 151, 90, 0.9);
}

/* ── Body ─────────────────────────────────────────────────────── */
.sc-modal__body {
  padding: 1.5rem;
}

/* ── Size chart image ─────────────────────────────────────────── */
.sc-modal__chart-wrap {
  width: 100%;
  line-height: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-modal__chart-img {
  width: 100%;
  max-width: 100%;
  max-height: 78vh;

  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

/* ── Fallback size grid ───────────────────────────────────────── */
.sc-modal__no-chart {
  width: 100%;
}

.sc-modal__no-chart-grid {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-modal__size-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sc-modal__size-row span {
  padding: 0.7rem 0;
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
}

.sc-modal__size-row--head span {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding-bottom: 0.5rem;
}

.sc-modal__unit-note {
  margin: 0.8rem 0 0;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.25);
  font-family: 'Jost', 'Inter', sans-serif;
}

/* ── Details & Care section ───────────────────────────────────── */
.sc-modal__care {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-modal__care-label {
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184, 151, 90, 0.7);
  margin: 0 0 0.8rem;
}

.sc-modal__care-text {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* ── Keyframes ────────────────────────────────────────────────── */
@keyframes scBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scBackdropOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes scPanelIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scPanelOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 640px) {

  .sc-modal {
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
  }

  .sc-modal__panel {
        width: 100%;
        margin: 0 auto;
        max-height: none;
    }

  .sc-modal__header {
    padding: 1rem 1rem 0.8rem;
  }

.sc-modal__body {
  padding: 1rem;
}

  .sc-modal__title {
    font-size: 1.3rem;
  }
}


/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sc-modal.is-entering .sc-modal__backdrop,
  .sc-modal.is-entering .sc-modal__panel,
  .sc-modal.is-leaving .sc-modal__backdrop,
  .sc-modal.is-leaving .sc-modal__panel {
    animation: none;
  }
}