/* rezervasyon.css — Landing /rezervasyon/{id} sayfası için */

/* hidden attribute reseti: .rez-wstep{display:grid} gibi kurallar UA'nın [hidden]{display:none}
   kuralını ezip gizli adımları gösteriyordu (wizard tüm adımları aynı anda çiziyordu). */
[hidden] { display: none !important; }

.rez-wrap { padding: 32px 0 64px; background: var(--bg-2); min-height: 80vh; }
.rez-container { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 720px; }

/* Head */
.rez-head {
    background: var(--bg); border-radius: var(--radius-lg); padding: 20px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    display: flex; gap: 16px; align-items: center;
}
.rez-head[data-loading="true"] .rez-biz-shimmer {
    height: 72px; width: 100%; border-radius: var(--radius);
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 37%, var(--bg-2) 63%);
    background-size: 400% 100%;
    animation: rez-shimmer 1.4s ease infinite;
}
@keyframes rez-shimmer { 0%{background-position:100% 50%} 100%{background-position:0 50%} }

.rez-biz-logo { width: 64px; height: 64px; border-radius: 16px; background: var(--bg-tint); object-fit: cover; flex-shrink: 0; }
.rez-biz-info h1 { font-size: 1.35rem; margin: 0 0 4px; color: var(--brand); }
.rez-biz-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.rez-biz-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Form */
.rez-form {
    background: var(--bg); border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    display: grid; gap: 20px;
}

.rez-step { border: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rez-step legend {
    font-weight: 700; font-size: 15px; color: var(--brand);
    display: flex; align-items: center; gap: 10px;
    padding: 0; margin-bottom: 4px;
}
.rez-step-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}

/* Services */
.rez-staff, .rez-slots {
    display: grid; gap: 8px;
}
/* Hizmetler: kategoriler dikey yığın; her kategori gövdesi (ve düz liste) 1-2 sütun grid */
.rez-services { display: flex; flex-direction: column; gap: 8px; }
.rez-svc-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rez-staff { grid-template-columns: 1fr; }
.rez-slots { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }

/* Kategori (ServiceGroup) — accordion: başlık tıklanır, gövde varsayılan kapalı */
.rez-svc-group { display: flex; flex-direction: column; gap: 8px; }
.rez-svc-group-title {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; padding: 13px 14px;
    background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer; text-align: left; font-family: inherit; font-size: 15px; color: var(--ink);
    transition: all var(--transition);
}
.rez-svc-group-title:hover { border-color: var(--brand-light); }
.rez-svc-group-name { font-weight: 600; }
.rez-svc-group-count { color: var(--muted); font-weight: 500; }
.rez-svc-caret {
    color: var(--muted); font-size: 20px; line-height: 1;
    transition: transform var(--transition);
}
.rez-svc-group-title[aria-expanded="true"] .rez-svc-caret { transform: rotate(90deg); }
.rez-svc-group-body[hidden] { display: none; }

.rez-chip {
    display: block; width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer; text-align: left;
    transition: all var(--transition);
    font-family: inherit; font-size: 15px; color: var(--ink);
}
.rez-chip:hover { border-color: var(--brand-light); background: var(--bg-tint); }
.rez-chip[aria-pressed="true"], .rez-chip.is-active {
    border-color: var(--brand); background: var(--brand); color: #fff;
    box-shadow: var(--shadow-sm);
}
.rez-chip[disabled] { opacity: 0.45; cursor: not-allowed; background: var(--bg-2); }

.rez-chip-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rez-chip-row strong { font-weight: 600; }
.rez-chip-row .rez-chip-sub { color: var(--muted); font-size: 13px; }
.rez-chip[aria-pressed="true"] .rez-chip-sub { color: rgba(255,255,255,0.85); }

.rez-slot-chip { padding: 10px 8px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
/* Grid container'lardaki bilgi/boş mesajları (yükleniyor / uygun saat yok) tüm satırı kaplasın —
   yoksa slot grid'inin dar sütununa sıkışıp kelime kelime dikey diziliyor. */
.rez-slots > p, .rez-staff > p, .rez-svc-grid > p { grid-column: 1 / -1; margin: 0; }

/* ── Wizard (çoklu-hizmet akışı) ── */
.rez-steps-ind { display: flex; align-items: flex-start; gap: 4px; list-style: none; margin: 0; padding: 0; }
.rez-steps-ind li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.rez-si-num {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-2); border: 1px solid var(--line);
    font-size: 13px; font-weight: 700; color: var(--muted);
}
.rez-si-label { font-size: 11px; font-weight: 600; }
.rez-steps-ind li.is-active .rez-si-num,
.rez-steps-ind li.is-done .rez-si-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.rez-steps-ind li.is-active, .rez-steps-ind li.is-done { color: var(--brand); }

.rez-wstep { display: grid; gap: 14px; }
.rez-wstep-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 0; }
.rez-field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 4px 0 0; }

.rez-wnav { display: flex; gap: 10px; margin-top: 6px; }
.rez-wnav .btn { flex: 1; }
.rez-wnav .btn-ghost { flex: 0 0 auto; }
.rez-wstep .rez-actions { position: static; margin: 6px 0 0; padding: 14px 0 0; padding-inline: 0; }

/* Hizmet kartı (çoklu seçim, checkbox) */
.rez-svc-chip { display: flex; align-items: center; gap: 12px; }
.rez-svc-chip-main { flex: 1; display: grid; gap: 2px; }
.rez-svc-chip-main .rez-chip-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rez-svc-check { width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto; border: 2px solid var(--line); position: relative; transition: all var(--transition); }
.rez-svc-chip[aria-pressed="true"] { background: var(--bg-tint); border-color: var(--brand); color: var(--ink); box-shadow: none; }
.rez-svc-chip[aria-pressed="true"] .rez-chip-sub { color: var(--muted); }
.rez-svc-chip[aria-pressed="true"] .rez-svc-check { background: var(--brand); border-color: var(--brand); }
.rez-svc-chip[aria-pressed="true"] .rez-svc-check::after {
    content: ''; position: absolute; left: 6px; top: 2px;
    width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Hizmet tab'ları (step 3) */
.rez-svc-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.rez-svc-tab {
    padding: 8px 14px; border-radius: 999px; cursor: pointer;
    background: var(--bg-2); border: 1px solid var(--line);
    font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.rez-svc-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rez-svc-tab-ok { color: var(--success); font-weight: 700; }
.rez-svc-tab.is-active .rez-svc-tab-ok { color: #fff; }

.rez-svc-timebox {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 14px; border-radius: var(--radius);
    background: var(--bg-tint); border: 1px solid var(--line);
}
.rez-svc-timebox strong { color: var(--ink); }
.rez-svc-time { font-size: 13px; color: var(--brand); font-weight: 600; }

/* Özet (step 4) */
.rez-summary-list { display: grid; gap: 8px; }
.rez-summary-item { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--line); }
.rez-summary-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rez-summary-price { color: var(--brand); font-weight: 700; }
.rez-summary-total { display: flex; justify-content: space-between; padding: 10px 2px 0; font-weight: 800; color: var(--brand); border-top: 1px solid var(--line); }

/* Onay — çoklu hizmet listesi */
.rez-onay-svclist { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.rez-onay-svc { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--line); }
.rez-onay-svc span { font-size: 13px; color: var(--muted); }

/* Telefon doğrulama (OTP) */
.rez-otp { display: grid; gap: 8px; }
.rez-otp-actions { display: flex; gap: 8px; }
.rez-otp-actions .btn { flex: 1; }
.rez-otp-status { font-size: 13px; margin: 0; color: var(--muted); }
.rez-otp-status.is-error { color: #991b1b; }
.rez-otp-status.is-ok { color: var(--success); font-weight: 600; }

/* Fields */
.rez-field { display: grid; gap: 6px; }
.rez-field > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.rez-field input[type="text"],
.rez-field input[type="tel"],
.rez-field input[type="date"] {
    padding: 12px 14px; border-radius: var(--radius);
    border: 1px solid var(--line); font-family: inherit; font-size: 16px;
    background: var(--bg); color: var(--ink);
    transition: border-color var(--transition);
}
.rez-field input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(13, 59, 110, 0.12);
}

.rez-checkbox { flex-direction: row; align-items: start; gap: 10px; display: flex; }
.rez-checkbox input { margin-top: 3px; }
.rez-checkbox > span { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.rez-checkbox > span a { color: var(--brand); text-decoration: underline; }

/* KVKK aydınlatma bildirimi — onay kutusu YOK, yalnızca bilgilendirme (m.5/2-c). */
.rez-consent-note {
    font-size: 13px; line-height: 1.6; color: var(--muted);
    margin: 2px 0 0;
}
.rez-consent-note a { color: var(--brand); text-decoration: underline; }

/* "Randevuyu Oluştur" pasifken nedenini söyleyen ipucu. */
.rez-confirm-hint {
    font-size: 13px; color: var(--muted);
    margin: 8px 0 0; text-align: center;
}

/* Pasif buton — tıklanamaz olduğu görsel olarak da belli olsun. */
.rez-wnav .btn:disabled,
.rez-wnav .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Hukuki metin modalı ---- */
.legal-modal { position: fixed; inset: 0; z-index: 1000; display: flex; }
.legal-modal[hidden] { display: none; }
.legal-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.legal-modal__panel {
    position: relative; margin: auto;
    width: min(760px, 100% - 24px); height: min(84vh, 100% - 24px);
    background: var(--bg); border-radius: 14px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.legal-modal__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.legal-modal__title { font-size: 16px; margin: 0; color: var(--brand); }
.legal-modal__close {
    border: 0; background: transparent; font-size: 18px; line-height: 1;
    color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.legal-modal__close:hover { background: var(--line); color: var(--ink-1); }
/* Metinler kendi stilini taşıyan tam HTML sayfaları — iframe ile izole edilir. */
.legal-modal__frame { flex: 1 1 auto; width: 100%; border: 0; }
.legal-modal__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-top: 1px solid var(--line); flex: 0 0 auto;
}
.legal-modal__newtab { font-size: 13px; color: var(--brand); text-decoration: underline; }

/* Actions */
.rez-actions {
    position: sticky; bottom: 0;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 14px 0; margin: 8px -24px -24px; padding-inline: 24px;
    display: grid; gap: 10px;
}
.rez-actions .btn { width: 100%; }
.rez-summary { font-size: 14px; color: var(--ink-2); }
.rez-summary strong { color: var(--brand); }

.rez-error {
    background: #fee2e2; color: #991b1b;
    border: 1px solid #fecaca; border-radius: var(--radius);
    padding: 10px 14px; font-size: 14px; margin: 0;
}

.rez-muted { color: var(--muted); font-size: 14px; margin: 0; }

/* Aside note */
.rez-note {
    background: var(--bg); border-radius: var(--radius-lg); padding: 20px;
    border: 1px solid var(--line);
    text-align: center;
}
.rez-note h3 { font-size: 1rem; margin-bottom: 8px; }
.rez-note p { font-size: 14px; margin-bottom: 14px; }

/* Onay */
.rez-onay { max-width: 560px; margin: 0 auto; padding-top: 24px; }
.rez-success-card {
    background: var(--bg); border-radius: var(--radius-lg); padding: 32px 24px;
    box-shadow: var(--shadow); border: 1px solid var(--line);
    text-align: center;
}
.rez-success-icon {
    width: 96px; height: 96px; border-radius: 50%;
    background: rgba(22, 163, 74, 0.12); color: var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.rez-success-card h1 { font-size: 1.75rem; margin-bottom: 10px; }
.rez-lead { font-size: 16px; color: var(--ink-2); margin-bottom: 22px; }
.rez-onay-detail {
    background: var(--bg-2); border-radius: var(--radius);
    padding: 16px; margin: 0 auto 22px;
    text-align: left; max-width: 400px;
}
.rez-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.rez-dl dt { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.rez-dl dd { margin: 0; color: var(--ink); font-weight: 600; }
.rez-onay-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.rez-onay-help { font-size: 13px; color: var(--muted); }

/* Tablet+ */
@media (min-width: 640px) {
    .rez-svc-grid { grid-template-columns: 1fr 1fr; }
    .rez-staff { grid-template-columns: 1fr 1fr 1fr; }
    .rez-slots { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

/* ===== DARK TEMA (<html data-yr-theme="dark">, wwwroot/js/theme.js) =====
   Renk değişkenleri kapsayıcıda ezilir: /onay'da rezervasyon-site.css (:root),
   /magaza içinde magaza-randevu.css (.sp-rez). Burada yalnızca sabit renkli durumlar. */
:root[data-yr-theme="dark"] .rez-otp-status.is-error { color: #fca5a5; }
:root[data-yr-theme="dark"] .rez-error {
    background: rgba(239, 68, 68, 0.14); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35);
}
:root[data-yr-theme="dark"] .rez-field input:focus { box-shadow: 0 0 0 3px rgba(139, 123, 240, 0.25); }
:root[data-yr-theme="dark"] .rez-success-icon { background: rgba(34, 197, 94, 0.16); }
