/*
 * GigMint redesign: the public Service page (/service/{slug}, Service.dc.html). Phase 5 wave 2 (B2).
 * Loaded only by front-end/gig/gig-detail via the gm-styles stack; every selector is under .gm.
 * Tokens come from gigmint-ui.css.
 */

.gm .gm-svc-page { padding: 24px 0 96px; }
.gm .gm-svc-page .gm-crumbs { margin: 0 0 20px; }
.gm .gm-svc-page .gm-crumbs [aria-current] { color: var(--gm-ink-2); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm .gm-svc-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: 0 0 20px; border-radius: 12px; background: var(--gm-amber-wash); color: var(--gm-amber); font-size: 14px; font-weight: 500; }
.gm .gm-svc-notice .gm-svg { flex: none; margin-top: 2px; }

/* ---------- Layout: head + body on the left, the package picker on the right ---------- */
.gm .gm-svc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  grid-template-areas: "head aside" "body aside";
  grid-template-rows: auto 1fr;
  column-gap: 40px;
  row-gap: 32px;
  align-items: start;
}
.gm .gm-svc-head { grid-area: head; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gm .gm-svc-body { grid-area: body; display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.gm .gm-svc-aside { grid-area: aside; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------- Title + seller line ---------- */
.gm .gm-svc-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.gm .gm-svc-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; font-size: 14px; color: var(--gm-ink-2); }
.gm .gm-svc-byline__who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.gm .gm-svc-byline__name { font-weight: 600; color: var(--gm-ink); text-decoration: none; }
.gm .gm-svc-byline__name:hover { color: var(--gm-coral-ink); text-decoration: underline; }
.gm .gm-svc-byline__meta { display: block; font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-svc-sep { width: 1px; height: 18px; background: var(--gm-line); }
.gm .gm-svc-stat { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.gm .gm-svc-stat a { color: var(--gm-ink-2); }
.gm .gm-svc-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--gm-sunken); }
.gm .gm-svc-photo--lg { width: 72px; height: 72px; }
.gm .gm-svc-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gm .gm-svc-save { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--gm-line-strong); background: var(--gm-surface); color: var(--gm-ink-2); font: 600 13.5px/1 var(--gm-font-body); text-decoration: none; cursor: pointer; }
.gm .gm-svc-save:hover { color: var(--gm-ink); border-color: var(--gm-ink-2); }
.gm .gm-svc-save[aria-pressed="true"] { background: var(--gm-coral-wash); border-color: var(--gm-coral-ink); color: var(--gm-coral-ink); }
.gm .gm-svc-save[aria-pressed="true"] .gm-svg { fill: currentColor; }

/* ---------- Gallery ---------- */
.gm .gm-svc-gallery { display: flex; flex-direction: column; gap: 12px; }
.gm .gm-svc-stage { position: relative; margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--gm-sunken); border: 1px solid var(--gm-line); }
.gm .gm-svc-stage img, .gm .gm-svc-stage iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.gm .gm-svc-stage[hidden] { display: none; }
.gm .gm-svc-stage--empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #FDE3D6; color: #9A3412; }
.gm .gm-svc-stage--empty .gm-thumb__label { color: #9A3412; }
.gm .gm-svc-stage--link { display: flex; align-items: center; justify-content: center; }
.gm .gm-svc-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px; }
.gm .gm-svc-thumb { flex: none; width: 84px; height: 56px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--gm-line); background: var(--gm-sunken); color: var(--gm-ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.gm .gm-svc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm .gm-svc-thumb[aria-pressed="true"] { border: 2px solid var(--gm-ink); }

/* ---------- Content sections ---------- */
.gm .gm-svc-section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gm .gm-svc-section > h2, .gm .gm-svc-h2 { font-size: 22px; font-weight: 600; margin: 0; }
.gm .gm-svc-prose { font-size: 16px; line-height: 1.65; color: var(--gm-ink-2); overflow-wrap: anywhere; }
.gm .gm-svc-prose p { margin: 0 0 12px; }
.gm .gm-svc-prose ul, .gm .gm-svc-prose ol { margin: 0 0 12px; padding-left: 22px; }
.gm .gm-svc-prose img { max-width: 100%; height: auto; }
.gm .gm-svc-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.gm .gm-svc-sechead__sub { display: block; font-size: 13.5px; color: var(--gm-muted); margin-top: 4px; }

/* Escrow explainer */
.gm .gm-svc-escrow { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.gm .gm-svc-escrow__lede { margin: 6px 0 0; color: var(--gm-ink-2); font-size: 15px; }
.gm .gm-svc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: gmstep; }
.gm .gm-svc-steps li { display: flex; flex-direction: column; gap: 4px; padding-top: 22px; position: relative; font-size: 13.5px; color: var(--gm-muted); }
.gm .gm-svc-steps li::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--gm-teal); background: var(--gm-surface); box-sizing: border-box; }
.gm .gm-svc-steps li::after { content: ""; position: absolute; left: 16px; right: -12px; top: 5px; height: 2px; background: var(--gm-line); }
.gm .gm-svc-steps li:last-child::after { display: none; }
.gm .gm-svc-steps b { color: var(--gm-teal); font-size: 14px; font-weight: 600; }
.gm .gm-svc-escrow__foot { margin: 0; font-size: 13.5px; color: var(--gm-muted); }

/* FAQ */
.gm .gm-svc-faq { border: 1px solid var(--gm-line); border-radius: 16px; background: var(--gm-surface); }
.gm .gm-svc-faq details + details { border-top: 1px solid var(--gm-line); }
.gm .gm-svc-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 600; font-size: 15.5px; color: var(--gm-ink); border-radius: 16px; }
.gm .gm-svc-faq summary::-webkit-details-marker { display: none; }
.gm .gm-svc-faq summary .gm-svg { flex: none; color: var(--gm-muted); transition: transform .15s; }
.gm .gm-svc-faq details[open] summary .gm-svg { transform: rotate(180deg); }
.gm .gm-svc-faq__a { padding: 0 20px 18px; font-size: 15px; }

/* Reviews */
.gm .gm-svc-score { display: flex; align-items: baseline; gap: 8px; }
.gm .gm-svc-score__num { font-family: var(--gm-font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gm .gm-svc-reviews { display: flex; flex-direction: column; gap: 12px; }
.gm .gm-svc-review { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.gm .gm-svc-review__head { display: flex; align-items: center; gap: 12px; }
.gm .gm-svc-review__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gm .gm-svc-review__name { font-weight: 600; font-size: 14.5px; }
.gm .gm-svc-review__title { margin: 0; font-weight: 600; font-size: 15px; color: var(--gm-ink); overflow-wrap: anywhere; }
.gm .gm-svc-review__text { margin: 0; color: var(--gm-ink-2); font-size: 15px; overflow-wrap: anywhere; }
.gm .gm-svc-review__foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gm .gm-stars { display: inline-flex; gap: 2px; flex: none; color: var(--gm-ink); }
.gm .gm-stars svg { display: block; }
.gm .gm-svc-more > summary { list-style: none; cursor: pointer; display: inline-flex; font-weight: 600; color: var(--gm-coral-ink); padding: 6px 0; }
.gm .gm-svc-more > summary::-webkit-details-marker { display: none; }
.gm .gm-svc-more[open] > summary { display: none; }
.gm .gm-svc-empty { padding: 20px; color: var(--gm-muted); font-size: 15px; }

/* About the seller */
.gm .gm-svc-seller { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.gm .gm-svc-seller__top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gm .gm-svc-seller__id { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gm .gm-svc-seller__name { font-family: var(--gm-font-display); font-size: 20px; font-weight: 600; color: var(--gm-ink); text-decoration: none; }
.gm .gm-svc-seller__name:hover { color: var(--gm-coral-ink); }
.gm .gm-svc-seller__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gm .gm-svc-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--gm-line); border-radius: 12px; overflow: hidden; }
.gm .gm-svc-facts > div { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--gm-line); margin-left: -1px; }
.gm .gm-svc-facts dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-svc-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.gm .gm-svc-seller__bio { margin: 0; color: var(--gm-ink-2); font-size: 15px; overflow-wrap: anywhere; }

/* ---------- Package picker ---------- */
.gm .gm-pkg { padding: 0; overflow: hidden; }
.gm .gm-pkg__tabs { display: flex; background: var(--gm-sunken); border-bottom: 1px solid var(--gm-line); }
.gm .gm-pkg__tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--gm-ink-2); font: 600 14px/1.2 var(--gm-font-body); cursor: pointer; }
.gm .gm-pkg__tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gm .gm-pkg__tab small { font-size: 12.5px; font-weight: 500; color: var(--gm-muted); font-variant-numeric: tabular-nums; }
.gm .gm-pkg__tab[aria-selected="true"] { background: var(--gm-surface); color: var(--gm-coral-ink); border-bottom-color: var(--gm-coral-ink); }
.gm .gm-pkg__tab[aria-selected="true"] small { color: var(--gm-ink); }
.gm .gm-pkg__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.gm .gm-pkg__panel { display: flex; flex-direction: column; gap: 10px; }
.gm .gm-pkg__panel[hidden] { display: none; }
.gm .gm-pkg__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gm .gm-pkg__title { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.gm .gm-pkg__price { font-family: var(--gm-font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm .gm-pkg__desc { margin: 0; font-size: 14.5px; color: var(--gm-ink-2); overflow-wrap: anywhere; }
.gm .gm-pkg__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; color: var(--gm-ink); }
.gm .gm-pkg__meta span { display: inline-flex; align-items: center; gap: 6px; }
.gm .gm-pkg__extras { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.gm .gm-pkg__extras legend { padding: 0; margin: 0 0 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-pkg__extra { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--gm-line); border-radius: 12px; background: var(--gm-surface); cursor: pointer; font-size: 14px; }
.gm .gm-pkg__extra:has(input:checked) { border-color: var(--gm-coral-ink); background: var(--gm-coral-wash); }
.gm .gm-pkg__extra input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--gm-coral-ink); }
.gm .gm-pkg__extra-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.gm .gm-pkg__extra-name small { display: block; font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-pkg__extra-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm .gm-pkg__total { border-top: 1px solid var(--gm-line); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.gm .gm-pkg__breakdown { font-size: 12.5px; color: var(--gm-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gm .gm-pkg__sum { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.gm .gm-pkg__sum strong { font-family: var(--gm-font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.gm .gm-pkg__note { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-pkg__ctas { display: flex; flex-direction: column; gap: 8px; }
.gm .gm-pkg__ctas .gm-btn { width: 100%; justify-content: center; }
.gm .gm-pkg__owner { font-size: 14px; color: var(--gm-ink-2); margin: 0; }
.gm .gm-svc-safe { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; background: var(--gm-teal-wash); color: var(--gm-teal); font-size: 13.5px; font-weight: 600; }
.gm .gm-svc-safe .gm-svg { flex: none; }
.gm .gm-svc-offer { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.gm .gm-svc-offer p { margin: 0; font-size: 13.5px; color: var(--gm-muted); }
.gm .gm-svc-offer .gm-btn { width: 100%; justify-content: center; }

/* Custom offer request dialog */
.gm .gm-offer-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--gm-line); border-radius: 16px; background: var(--gm-surface); color: var(--gm-ink); box-shadow: var(--gm-shadow-raised); }
.gm .gm-offer-dialog::backdrop { background: rgba(28, 22, 18, .45); }
.gm .gm-offer-dialog__inner { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.gm .gm-offer-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gm .gm-offer-dialog__head h2 { font-size: 20px; margin: 0; }
.gm .gm-offer-dialog__hint { margin: 0; font-size: 14px; color: var(--gm-muted); }
.gm .gm-offer-dialog textarea { width: 100%; box-sizing: border-box; min-height: 130px; }
.gm .gm-offer-dialog__err { margin: 0; color: var(--gm-red); font-size: 13.5px; }
.gm .gm-offer-dialog__err:empty { display: none; }
.gm .gm-offer-dialog__count { font-size: 12.5px; color: var(--gm-muted); text-align: right; margin: -6px 0 0; }

/* Related services row */
.gm .gm-svc-related { margin-top: 64px; }

/* ---------- Phone ---------- */
@media (max-width: 960px) {
  .gm .gm-svc-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "aside" "body"; grid-template-rows: auto; row-gap: 28px; }
  .gm .gm-svc-aside { position: static; }
}
@media (max-width: 600px) {
  .gm .gm-svc-page { padding: 16px 0 64px; }
  .gm .gm-svc-sep { display: none; }
  .gm .gm-svc-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gm .gm-svc-steps li { padding: 0 0 0 24px; }
  .gm .gm-svc-steps li::after { display: none; }
  .gm .gm-svc-escrow, .gm .gm-svc-seller { padding: 18px; }
  .gm .gm-pkg__body { padding: 18px 16px; }
  .gm .gm-svc-thumb { width: 64px; height: 44px; }
  .gm .gm-svc-related { margin-top: 40px; }
}
