/* =========================================================
   صفحه رزرو میز — موبایل‌اول، فشرده و ظریف
   پالت سایت: سبز جنگلی + طلایی + کرم
   ========================================================= */

:root {
    --rv-green: #173b2a;
    --rv-green-2: #245238;
    --rv-gold: #a17b2f;
    --rv-gold-l: #d8b767;
    --rv-cream: #fbf6ea;
    --rv-card: #fffdf8;
    --rv-line: #e7dcc4;
    --rv-ink: #26352b;
    --rv-muted: #8a8171;
    --rv-red: #9c2b23;
}

/* این صفحه هدر و فوتر معمولی را نمی‌خواهد */
body:has(.rv) header,
body:has(.rv) footer { display: none; }

body:has(.rv) { background: var(--rv-cream); }

.rv {
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 18px;
    font-family: "Vazirmatn", sans-serif;
    color: var(--rv-ink);
}

/* ---------- نوار عکس ---------- */
.rv-banner {
    position: relative;
    height: 104px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 38px;
    background:
        linear-gradient(180deg, rgba(10, 28, 19, .30), rgba(10, 28, 19, .55)),
        url("../img/home/hero.jpg") center 40% / cover no-repeat,
        linear-gradient(135deg, #3a5a47, #1b3a2a);
}

.rv-brand {
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 5px;
    direction: ltr;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.rv-back {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--rv-green);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* ---------- کارت ---------- */
.rv-card {
    position: relative;
    max-width: 420px;
    margin: -30px auto 0;
    padding: 16px 14px 14px;
    border: 1px solid var(--rv-line);
    border-radius: 18px;
    background: var(--rv-card);
    box-shadow: 0 10px 30px rgba(23, 59, 42, .14);
}

.rv-card h1 {
    margin: 0;
    color: var(--rv-green);
    font-family: "Lalezar", "Vazirmatn", sans-serif;
    font-size: 19px;
    font-weight: 400;
    text-align: center;
}

.rv-sub {
    margin: 3px 0 12px;
    color: var(--rv-muted);
    font-size: 10.5px;
    text-align: center;
}

/* ---------- نوار مراحل ---------- */
.rv-steps {
    display: flex;
    justify-content: space-between;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.rv-steps li {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--rv-muted);
    font-size: 9.5px;
}

.rv-steps li::after {
    content: "";
    position: absolute;
    top: 11px;
    right: calc(50% + 14px);
    left: calc(-50% + 14px);
    border-top: 1px dashed #d9cba8;
}

.rv-steps li:last-child::after { display: none; }

.rv-steps b {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rv-line);
    border-radius: 50%;
    background: #fff;
    font-size: 10.5px;
    font-weight: 700;
}

.rv-steps li.is-active { color: var(--rv-green); font-weight: 700; }

.rv-steps li.is-active b {
    border-color: var(--rv-gold);
    background: var(--rv-gold);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(161, 123, 47, .2);
}

.rv-steps li.is-done b {
    border-color: var(--rv-green-2);
    background: var(--rv-green-2);
    color: #fff;
}

/* ---------- پنل‌ها ---------- */
.rv-panel[hidden] { display: none; }

.rv-panel h2 {
    margin: 0 0 8px;
    color: var(--rv-green);
    font-size: 13px;
    font-weight: 800;
}

/* تاریخ */
.rv-days {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.rv-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 6px 2px;
    border: 1px solid var(--rv-line);
    border-radius: 11px;
    background: #fff;
    color: var(--rv-ink);
    font-family: inherit;
    cursor: pointer;
}

.rv-day small { font-size: 9.5px; color: var(--rv-muted); line-height: 1.5; }
.rv-day strong { font-size: 15px; line-height: 1.3; }

.rv-day.is-selected {
    border-color: var(--rv-green);
    background: var(--rv-green);
    color: #fff;
}

.rv-day.is-selected small { color: var(--rv-gold-l); }

/* ساعت */
.rv-times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-height: 268px;
    overflow-y: auto;
    padding: 1px;
}

.rv-time {
    padding: 8px 0;
    border: 1px solid var(--rv-line);
    border-radius: 10px;
    background: #fff;
    color: var(--rv-ink);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.rv-time.is-selected {
    border-color: var(--rv-gold);
    background: #fbf0d0;
    color: var(--rv-green);
    box-shadow: 0 0 0 2px rgba(161, 123, 47, .25);
}

.rv-time.is-off {
    background: #f1ece0;
    color: #b7ae9b;
    text-decoration: line-through;
    cursor: not-allowed;
}

.rv-loading { grid-column: 1 / -1; padding: 16px 0; color: var(--rv-muted); font-size: 11px; text-align: center; }

/* تعداد */
.rv-party {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 0 4px;
}

.rv-party button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--rv-line);
    border-radius: 12px;
    background: #fff;
    color: var(--rv-green);
    font-family: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.rv-party button:disabled { opacity: .35; cursor: not-allowed; }

.rv-party span {
    min-width: 72px;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    color: var(--rv-green);
}

.rv-hint { margin: 4px 0 8px; color: var(--rv-muted); font-size: 10.5px; text-align: center; }

/* اطلاعات */
.rv-summary {
    margin-bottom: 9px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #fbf0d0;
    color: var(--rv-green);
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
    line-height: 1.8;
}

.rv-panel label {
    display: block;
    margin: 7px 0 3px;
    color: #4d493f;
    font-size: 10.5px;
    font-weight: 700;
}

.rv-panel input,
.rv-panel textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 11px;
    border: 1px solid #ddd5c6;
    border-radius: 10px;
    background: #fff;
    color: var(--rv-ink);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    resize: none;
}

.rv-panel input:focus,
.rv-panel textarea:focus {
    border-color: var(--rv-gold);
    box-shadow: 0 0 0 3px rgba(161, 123, 47, .16);
}

/* پیام */
.rv-msg { min-height: 0; margin-top: 8px; font-size: 11px; line-height: 1.8; text-align: center; }
.rv-msg.is-err { color: var(--rv-red); }
.rv-msg.is-ok { color: var(--rv-green-2); }

/* دکمه‌ها */
.rv-actions { display: flex; gap: 8px; margin-top: 12px; }

.rv-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border: 1.5px solid transparent;
    border-radius: 22px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.rv-btn[hidden] { display: none; }

.rv-btn-main { flex: 2; background: var(--rv-green); color: #fff; }
.rv-btn-main:active { background: var(--rv-green-2); }
.rv-btn-main:disabled { opacity: .6; }

.rv-btn-ghost { background: #fff; border-color: var(--rv-line); color: var(--rv-muted); }

/* ---------- ثبت شد ---------- */
#rvDone { text-align: center; }
#rvDone[hidden] { display: none; }

.rv-done-icon {
    width: 46px;
    height: 46px;
    margin: 4px auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--rv-green-2);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 0 0 5px rgba(36, 82, 56, .15);
}

.rv-done-icon.is-cancel { background: var(--rv-red); box-shadow: 0 0 0 5px rgba(156, 43, 35, .15); }

.rv-done-title { margin: 0 0 8px; font-size: 15px; color: var(--rv-green); }

.rv-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 8px;
    padding: 7px;
    border-radius: 10px;
    background: #fbf0d0;
    font-size: 12px;
    font-weight: 700;
}

.rv-code strong { letter-spacing: 1px; direction: ltr; color: var(--rv-green); font-size: 14px; }
.rv-code[hidden], .rv-details[hidden], .rv-note[hidden] { display: none; }

.rv-details {
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
    font-size: 12px;
    font-weight: 700;
}

.rv-details li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-bottom: 1px solid #eee7da;
}

.rv-note { margin: 8px 0 0; color: var(--rv-muted); font-size: 10.5px; line-height: 1.9; }

@media (min-width: 520px) {
    .rv-banner { height: 150px; }
    .rv-card { margin-top: -40px; padding: 22px 20px 18px; }
}
