/* Yüzük ölçü rehberi ve ürün sayfası hediye satırı — bütün temalarda. İşaretleme ring-guide.js'te; yalnızca yüzük ürününde
   (MV_POLICY.ring) ve hediye satırı açıkken (MV_POLICY.gift.pdpNote) basılır, aksi hâlde bu dosyadaki kuralların hiçbiri bir öğeye uymaz.
   - Ölçü başlığı: .rg-side > .rg-hint (“Ölçünüz: 16”), .rg-link (Beden Tablosu bağlantısının .chart-link görünümünü paylaşır)
   - Pencere (.modal üzerine; telefonda alttan açılan sayfa): .rg-modal > .rg-box > .rg-head (.rg-tabs > .rg-tab), .rg-body > .rg-panel
     .rg-table (tr.is-offer / .is-out / .is-cur / .is-hl; .is-mini), .rg-steps > .rg-step, .rg-calc (.rg-in, .rg-tip), .rg-out > .rg-res,
     .rg-screen (.rg-ring-stage > .rg-ring, .rg-range, .rg-note), .rg-saved
   - Hediye satırı: .gift-note-line (.gift-note-t, .gift-note-fee, small)
   Renkler temadan (--brand, --text, --muted, --line, --soft, --bg, --green, --red, --radius); vurgu --rg-accent (varsayılan --brand). */

.rg-side, .rg-modal, .gift-note-line { --rg-a: var(--rg-accent, var(--brand, #111)); }

/* ---------- Ölçü başlığı ---------- */
.rg-side { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 10px; min-width: 0; color: var(--text); }
.opt-head .rg-side, .opt-head .rg-link, .opt-head .rg-link span { color: var(--text); }
.rg-link { white-space: nowrap; }
.rg-link .icon { width: 18px; height: 18px; }
.rg-hint { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--soft, #F6F6F6); font-size: 12px; line-height: 1; white-space: nowrap; }
.opt-head .rg-hint { color: var(--text); }
.rg-hint b { margin-left: 3px; font-weight: 600; color: var(--text); }
.rg-hint[hidden] { display: none; }

/* ---------- Pencere ---------- */
.rg-modal .rg-box { display: flex; flex-direction: column; width: min(760px, 100%); height: min(700px, calc(100vh - 40px)); max-height: none; padding: 0; overflow: hidden; }
.rg-box:focus { outline: none; }
.rg-head { position: relative; flex: none; padding: 24px 28px 0; border-bottom: 1px solid var(--line, #E8E8E8); }
.rg-head h3 { margin: 0 48px 12px 0; }
.rg-head .x-btn { position: absolute; top: 14px; right: 14px; }
.rg-tabs { display: flex; gap: 4px; margin: 0 -10px; overflow-x: auto; scrollbar-width: none; }
.rg-tabs::-webkit-scrollbar { display: none; }
.rg-tab { position: relative; flex: none; height: 44px; padding: 0 10px; color: var(--muted, #777); font-size: 14px; font-weight: 500; white-space: nowrap; }
.rg-tab:hover { color: var(--text); }
.rg-tab[aria-selected="true"] { color: var(--text); }
.rg-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--rg-a); }
.rg-tab:focus-visible { outline: 2px solid var(--rg-a); outline-offset: -4px; border-radius: 4px; }
.rg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 28px 24px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.rg-panel[hidden] { display: none; }
.rg-panel:focus { outline: none; }
.rg-panel:focus-visible { outline: 2px solid var(--rg-a); outline-offset: 4px; }
.rg-lead { margin: 0 0 14px; color: var(--muted, #777); font-size: 13.5px; line-height: 1.55; }
.rg-lead b { color: var(--text); font-weight: 500; }

/* Tablo */
.rg-table-wrap { border: 1px solid var(--line, #E8E8E8); border-radius: min(var(--radius, 8px), 10px); overflow: hidden; }
.rg-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rg-table th, .rg-table td { height: 42px; padding: 0 12px; border-bottom: 1px solid var(--line, #E8E8E8); text-align: left; vertical-align: middle; white-space: nowrap; }
.rg-table tbody tr:last-child > * { border-bottom: 0; }
.rg-table thead th { height: 38px; background: var(--soft, #F6F6F6); color: var(--muted, #777); font-size: 12.5px; font-weight: 500; }
.rg-table tbody th { width: 64px; font-weight: 600; }
.rg-table td:last-child, .rg-table th:last-child { width: 96px; text-align: right; }
.rg-table tr.is-out > th, .rg-table tr.is-out > td:not(:last-child) { color: var(--muted, #777); }
.rg-table tr:not(.is-offer) > th, .rg-table tr:not(.is-offer) > td { color: var(--muted, #777); }
.rg-table tr.is-hl > * { background: color-mix(in srgb, var(--rg-a) 7%, var(--bg, #fff)); color: var(--text); }
.rg-table tr.is-hl > th { box-shadow: inset 3px 0 0 var(--rg-a); }
.rg-th-s { font-size: 12px; }
.rg-pick-sm { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 30px; padding: 0 12px; border: 1px solid var(--brand, #111); border-radius: min(var(--radius, 8px), 6px); color: var(--brand, #111); font-size: 12.5px; font-weight: 500; transition: background-color .15s, color .15s; }
.rg-pick-sm:hover { background: var(--brand, #111); color: #fff; }
.rg-out, .rg-na { color: var(--muted, #777); font-size: 12.5px; }
.rg-cur { display: inline-flex; align-items: center; gap: 4px; color: var(--green, #1E874B); font-size: 12.5px; font-weight: 500; }
.rg-cur .icon { width: 15px; height: 15px; stroke-width: 2; }
.rg-table.is-mini { border: 1px solid var(--line, #E8E8E8); border-radius: min(var(--radius, 8px), 8px); border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--bg, #fff); font-size: 13px; }
.rg-table.is-mini th, .rg-table.is-mini td { height: 34px; }
.rg-table.is-mini td:last-child { width: auto; text-align: right; }

/* İple ölç: adımlar */
.rg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.rg-step { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px; border: 1px solid var(--line, #E8E8E8); border-radius: min(var(--radius, 8px), 10px); }
.rg-step-art { display: block; aspect-ratio: 120 / 84; padding: 4px; border-radius: min(var(--radius, 8px), 6px); background: var(--soft, #F6F6F6); }
.rg-step-art svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--text, #1A1A1A); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rg-step-art .rg-sk-l { stroke: var(--muted, #777); stroke-width: 1.2; }
.rg-step-art .rg-ac { stroke: var(--rg-a); stroke-width: 2.4; }
.rg-step-art .rg-mk { stroke: var(--rg-a); stroke-width: 1.6; }
.rg-step-art .rg-dot { fill: var(--rg-a); stroke: none; }
.rg-step-art .rg-tx { fill: var(--muted, #777); stroke: none; font: 600 10px/1 var(--font, sans-serif); }
.rg-step-tx { font-size: 13px; line-height: 1.5; }
.rg-step-tx b { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: var(--rg-a); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1; vertical-align: 1px; }

/* Hesap formu ve sonuç */
.rg-calc { padding: 16px; border: 1px solid var(--line, #E8E8E8); border-radius: min(var(--radius, 8px), 10px); }
.rg-calc > label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 500; }
.rg-calc-row { display: flex; align-items: center; gap: 10px; }
.rg-in { position: relative; display: flex; align-items: center; flex: 0 1 220px; min-width: 0; }
.rg-in input { width: 100%; height: 46px; padding: 0 44px 0 14px; border: 1px solid var(--line, #E8E8E8); border-radius: min(var(--radius, 8px), 6px); background: var(--bg, #fff); color: var(--text); font: inherit; font-size: 16px; -moz-appearance: textfield; appearance: textfield; }
.rg-in input::-webkit-outer-spin-button, .rg-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rg-in input:focus { border-color: var(--text); outline: none; }
.rg-in input.err { border-color: var(--red, #E0151F); }
.rg-in > span { position: absolute; right: 14px; color: var(--muted, #777); font-size: 13px; pointer-events: none; }
.rg-calc-row .btn { flex: none; height: 46px; padding: 0 20px; }
.rg-tip { margin: 10px 0 0; color: var(--muted, #777); font-size: 12.5px; line-height: 1.5; }
.rg-out:empty { display: none; }
.rg-out { margin-top: 14px; }
.rg-res { padding: 14px; border-radius: min(var(--radius, 8px), 8px); background: var(--soft, #F6F6F6); }
.rg-res.is-warn { background: color-mix(in srgb, var(--red, #E0151F) 7%, var(--bg, #fff)); }
.rg-res-h { margin: 0; font-size: 15px; line-height: 1.35; }
.rg-res-h b { font-size: 20px; font-weight: 600; }
.rg-res-s { margin: 4px 0 10px; color: var(--muted, #777); font-size: 12.5px; line-height: 1.45; }
.rg-res.is-warn .rg-res-s { margin-bottom: 0; }
.rg-res-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.rg-res-act .btn { height: 44px; padding: 0 20px; }
.rg-res-msg { margin: 0; font-size: 13.5px; line-height: 1.45; }
.rg-res-msg.is-out, .rg-res-msg.is-err { color: var(--red, #E0151F); }
.rg-res-msg.is-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--green, #1E874B); font-weight: 500; }
.rg-res-msg .icon { width: 16px; height: 16px; stroke-width: 2; }

/* Yüzüğünle ölç: ekranda daire */
.rg-screen { margin-top: 14px; padding: 16px; border: 1px dashed var(--line, #E8E8E8); border-radius: min(var(--radius, 8px), 10px); }
.rg-screen-h { margin: 0 0 6px; color: var(--muted, #777); font-size: 12.5px; line-height: 1.5; }
.rg-screen-h b { display: block; margin-bottom: 2px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.rg-ring-stage { display: grid; place-items: center; height: 100px; }
.rg-ring { box-sizing: border-box; width: var(--d, 17mm); height: var(--d, 17mm); border: 2px solid var(--rg-a); border-radius: 50%; background: radial-gradient(circle, var(--rg-a) 0 1.5px, transparent 2px); box-shadow: 0 0 0 8px color-mix(in srgb, var(--rg-a) 10%, transparent); }
.rg-range { display: block; width: 100%; height: 28px; margin: 4px 0 0; accent-color: var(--rg-a); }
.rg-range-v { margin: 2px 0 0; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.rg-note { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; color: var(--muted, #777); font-size: 12px; line-height: 1.45; }
.rg-note .icon { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.rg-saved { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 0; color: var(--muted, #777); font-size: 12.5px; }
.rg-saved:empty { display: none; }
.rg-saved b { color: var(--text); font-weight: 600; }
.rg-forget { color: var(--text); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Hediye satırı (ürün sayfası) ---------- */
.gift-note-line { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 11px 14px; border-radius: min(var(--radius, 8px), 10px); background: var(--soft, #F6F6F6); color: var(--text); font-size: 13px; line-height: 1.45; }
.gift-note-line > .icon { flex: none; width: 20px; height: 20px; margin-top: 0; color: var(--rg-a); }
.gift-note-t { min-width: 0; }
.gift-note-t b { font-weight: 500; }
.gift-note-fee { color: var(--muted, #777); }
.gift-note-t small { display: block; margin-top: 1px; color: var(--muted, #777); font-size: 12.5px; }

/* ---------- Telefon: alttan açılan sayfa ---------- */
@media (max-width: 640px) {
  .rg-modal .rg-box { height: min(88vh, 720px); height: min(88dvh, 720px); }
  .rg-head { padding: 22px 16px 0; }
  .rg-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--line, #E8E8E8); }
  .rg-head h3 { margin-bottom: 8px; }
  .rg-head .x-btn { top: 10px; right: 8px; }
  .rg-tabs { margin: 0 -6px; gap: 0; }
  .rg-tab { flex: 1 1 auto; padding: 0 6px; font-size: 13.5px; }
  .rg-tab[aria-selected="true"]::after { left: 6px; right: 6px; }
  .rg-body { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
  .rg-table { font-size: 13px; }
  .rg-table th, .rg-table td { height: 40px; padding: 0 8px; }
  .rg-table tbody th { width: 52px; }
  .rg-table td:last-child, .rg-table th:last-child { width: 78px; }
  .rg-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rg-step { flex-direction: row; align-items: center; gap: 12px; padding: 8px; }
  .rg-step-art { flex: none; width: 104px; }
  .rg-calc { padding: 14px; }
  .rg-in { flex: 1 1 auto; }
  .rg-calc-row .btn { padding: 0 14px; }
  .rg-side { gap: 4px 8px; }
}
