/* ── "Get It Stitched" modal — real chargeable option ─────────
   Builds on the shared .pl-stitch-price-* tokens/classes already
   defined in product-page.css (trigger button, overlay, modal shell,
   price table cards, close button, CTA). This file only adds the new
   mode toggle / tabs / measurement grid layer on top of that. */

.pl-stitch-price-modal.pl-stitchopt-modal {
  max-width: 800px;
  padding: 26px 30px 22px;
  text-align: left;
}
@media (max-width: 860px) {
  .pl-stitch-price-modal.pl-stitchopt-modal {
    max-width: 92vw;
  }
}
@media (max-width: 480px) {
  .pl-stitch-price-modal.pl-stitchopt-modal {
    padding: 16px 16px 14px;
  }
}

/* Status pill + trigger button sit on one row as a matched, EQUAL-
   WIDTH pair (flex: 1 1 0 each, regardless of how much text either
   holds) — the trigger opens/edits the modal, the status is a live,
   always-visible readout of what will actually be charged (no
   separate "Edit" affordance needed). */
.pl-stitchopt-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}
.pl-stitchopt-row .pl-stitch-price-trigger {
  flex: 1 1 0;
  margin-bottom: 0;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
/* Same pill shape/padding/font as .pl-stitch-price-trigger
   (product-page.css) and the same flex-basis, so the two read as a
   matched, equal-width pair — only the fill color differs (neutral by
   default, green once Custom Stitched is saved). white-space: normal
   lets a long saved tier name ("Stitching with Lining (+₹1,800)")
   wrap onto a second line inside the pill instead of overflowing or
   forcing the row wider than its container. */
.pl-stitchopt-status {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  font-family: var(--plm-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--plm-text-muted);
  background: var(--plm-cream);
  border: 1px solid var(--plm-border);
  border-radius: 20px;
  padding: 7px 14px;
  white-space: normal;
}
.pl-stitchopt-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plm-text-muted);
  flex: none;
}
.pl-stitchopt-status.is-custom {
  color: #1a7a3d;
  background: rgba(26,122,61,0.08);
  border-color: rgba(26,122,61,0.25);
}
.pl-stitchopt-status.is-custom .pl-stitchopt-status-dot {
  background: #1a7a3d;
}

.pl-stitchopt-extra-note {
  font-family: var(--plm-font-body);
  font-size: 12px;
  font-weight: 600;
  color: #2461c9;
  margin: 6px 0 0;
}

/* ── Tabs ─────────────────────────────────────────────────── */
.pl-stitchopt-body {
  margin-top: 18px;
  border-top: 1px solid var(--plm-border);
  padding-top: 16px;
}
.pl-stitchopt-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--plm-border);
  margin-bottom: 18px;
}
/* Real hit-area on all sides (not just a bare underline) — matches
   the padding language every other clickable control in this modal
   uses (buttons, pills, selects all have horizontal breathing room). */
.pl-stitchopt-tab {
  font-family: var(--plm-font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--plm-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  cursor: pointer;
}
.pl-stitchopt-tab.is-active {
  color: var(--plm-maroon);
  border-bottom-color: var(--plm-maroon);
}
/* Astra's sitewide default button:hover/:focus background (gold) would
   otherwise leak onto these — every bare <button> in this modal needs
   its own explicit hover/focus state for the same reason, see the
   .pl-stitchopt-remove-link and #pl-stitchopt-save/#pl-stitchopt-size-
   apply-btn rules below. */
.pl-stitchopt-tab:hover,
.pl-stitchopt-tab:focus {
  background: none;
  color: var(--plm-maroon);
  outline: none;
}
.pl-stitchopt-tab:not(.is-active):hover,
.pl-stitchopt-tab:not(.is-active):focus {
  color: var(--plm-text);
}

.pl-stitchopt-req-note {
  font-family: var(--plm-font-body);
  font-size: 11.5px;
  color: var(--plm-text-muted);
  margin: 0 0 12px;
  line-height: 1.4;
}
.pl-stitchopt-req {
  color: #c0392b;
  margin-left: 2px;
}

.pl-stitchopt-section-title {
  font-family: var(--plm-font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--plm-deep);
  margin: 16px 0 10px;
}
.pl-stitchopt-section-title:first-of-type {
  margin-top: 4px;
}
.pl-stitchopt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 16px;
  margin-bottom: 6px;
}
@media (min-width: 700px) {
  .pl-stitchopt-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.pl-stitchopt-field label {
  display: block;
  font-family: var(--plm-font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--plm-text);
  margin-bottom: 4px;
}
.pl-stitchopt-input {
  width: 100%;
  font-family: var(--plm-font-body);
  font-size: 13px;
  color: var(--plm-text);
  background: var(--plm-cream);
  border: 1.5px solid var(--plm-border);
  border-radius: var(--plm-r);
  padding: 7px 9px;
  box-sizing: border-box;
}
.pl-stitchopt-input:focus {
  outline: none;
  border-color: var(--plm-gold);
}
.pl-stitchopt-input.has-error {
  border-color: #c0392b;
  background: rgba(192,57,43,0.06);
}

.pl-stitchopt-error {
  font-family: var(--plm-font-body);
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  margin: 8px 0;
}

#pl-stitchopt-save {
  width: 100%;
  border: none;
  cursor: pointer;
  margin-top: 6px;
}
/* Astra's sitewide default button:hover/:focus background would
   otherwise flatten this gradient to a plain gold on hover/tap —
   pin it to the same gradient explicitly. */
#pl-stitchopt-save:hover,
#pl-stitchopt-save:focus {
  background: linear-gradient(135deg, #E7A13D 0%, #C9772A 100%);
  color: #fff;
  outline: none;
}

.pl-stitchopt-remove-link {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--plm-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--plm-text-muted);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 10px;
  padding: 6px 0;
}
/* Same Astra button:hover/:focus leak as above — without this,
   hovering/tapping this plain text link fills it with a solid gold
   block instead of just tinting the text. */
.pl-stitchopt-remove-link:hover,
.pl-stitchopt-remove-link:focus {
  background: none;
  color: var(--plm-maroon);
  outline: none;
}

/* ── How to Measure tab ──────────────────────────────────── */
.pl-stitchopt-video {
  margin-bottom: 12px;
}
.pl-stitchopt-video iframe,
.pl-stitchopt-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--plm-r);
}
.pl-stitchopt-tips {
  margin: 0;
  padding-left: 18px;
  font-family: var(--plm-font-body);
  font-size: 12.5px;
  color: var(--plm-text);
  line-height: 1.6;
}

/* ── Size Guide tab ──────────────────────────────────────── */
.pl-stitchopt-size-note {
  font-family: var(--plm-font-body);
  font-size: 11.5px;
  color: var(--plm-text-muted);
  font-style: italic;
  margin: 0 0 10px;
  line-height: 1.4;
}
.pl-stitchopt-size-table {
  overflow-x: auto;
}
.pl-stitchopt-size-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--plm-font-body);
  font-size: 12.5px;
}
.pl-stitchopt-size-table th,
.pl-stitchopt-size-table td {
  border: 1px solid var(--plm-border);
  padding: 6px 10px;
  text-align: center;
}
.pl-stitchopt-size-table th {
  background: var(--plm-cream);
  color: var(--plm-deep);
  font-weight: 700;
}

.pl-stitchopt-size-apply {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--plm-border);
}
.pl-stitchopt-size-apply label {
  display: block;
  font-family: var(--plm-font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--plm-text);
  margin-bottom: 8px;
}
.pl-stitchopt-size-apply-row {
  display: flex;
  gap: 10px;
}
.pl-stitchopt-size-apply-row select {
  flex: 1;
  max-width: 160px;
  font-family: var(--plm-font-body);
  font-size: 13px;
  color: var(--plm-text);
  background: var(--plm-cream);
  border: 1.5px solid var(--plm-border);
  border-radius: var(--plm-r);
  padding: 7px 10px;
}
#pl-stitchopt-size-apply-btn {
  font-family: var(--plm-font-body);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #E7A13D 0%, #C9772A 100%);
  border: none;
  border-radius: var(--plm-r);
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
}
#pl-stitchopt-size-apply-btn:hover,
#pl-stitchopt-size-apply-btn:focus {
  background: linear-gradient(135deg, #E7A13D 0%, #C9772A 100%);
  color: #fff;
  outline: none;
}

@media (max-width: 560px) {
  .pl-stitchopt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 380px) {
  .pl-stitchopt-grid {
    grid-template-columns: 1fr;
  }
}
