/* =========================================================
   نوبت اینجاست — shared app theme (matches the Android mockups)
   ========================================================= */

@font-face {
    font-family: 'Vazir';
    src: url('/assets/fonts/vazir/Vazir-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazir';
    src: url('/assets/fonts/vazir/Vazir-Medium.woff2') format('woff2');
    font-weight: 500 600;
    font-display: swap;
}
@font-face {
    font-family: 'Vazir';
    src: url('/assets/fonts/vazir/Vazir-Bold.woff2') format('woff2');
    font-weight: 700 900;
    font-display: swap;
}

:root {
    --bg1: #5a6a89;
    --bg2: #2f3b54;
    --header: #4a587a;
    --card: #ffffff;
    --ink: #2a3346;
    --muted: #6b7385;
    --chip: #2b3a55;
    --chip2: #243049;
    --accent1: #3b5bdb;
    --accent2: #7048e8;
    --green: #2f9e44;
    --gold: #ffc83d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
    outline: 0 !important;
    border: none;
    font-family: inherit;
}

html { overflow-x: hidden; }

body.nb {
    direction: rtl;
    color: #fff;
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(255, 255, 255, .08), transparent 60%),
        linear-gradient(180deg, var(--bg1), var(--bg2));
    background-attachment: fixed;
    font-family: 'Vazir', Tahoma, "Segoe UI", sans-serif;
    font-size: 16px;
    padding-bottom: 90px;
}

/* ---------- header ---------- */
.nb-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    background: rgba(40, 50, 74, .92);
    box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.nb-header h1 {
    font-size: 20px;
    font-weight: 800;
    flex: 1;
    text-align: center;
}
.nb-iconbtn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.nb-iconbtn:hover { background: rgba(255, 255, 255, .2); }

/* ---------- layout ---------- */
.nb-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px;
}

/* ---------- cards ---------- */
.nb-card {
    background: var(--card);
    color: var(--ink);
    border-radius: 18px;
    padding: 18px;
    margin: 14px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.nb-card h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--ink);
}
.nb-section-title {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    margin: 30px 0 0;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}

/* ---------- buttons ---------- */
.nb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border-radius: 40px;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(59, 91, 219, .35);
    transition: transform .1s, filter .15s;
}
.nb-btn:active { transform: scale(.98); }
.nb-btn:hover { filter: brightness(1.07); }
.nb-btn.green { background: linear-gradient(90deg, #2b8a3e, #37b24d); box-shadow: 0 8px 20px rgba(47, 158, 68, .35); }
.nb-btn.ghost { background: rgba(255,255,255,.10); box-shadow: none; }
.nb-btn.danger-text { background: none; box-shadow: none; color: #ff6b6b; font-weight: 700; }

/* ---------- search (home) ---------- */
.nb-search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    /* sits above #results so the tucked (-15px) part of the dropdown is hidden behind the input */
    position: relative;
    z-index: 2;
    border: 2px solid transparent;
    transition: border-color .15s, box-shadow .15s;
}
/* highlight the search box while it's focused */
.nb-search:focus-within {
    border-color: #7048e8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 0 0 4px rgba(112, 72, 232, .18);
}
.nb-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #2a3346;
    text-align: right;
    padding: 12px 6px;
}
.nb-search .ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--accent1) 0%, var(--accent2) 50%, #9d4edd 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ---------- search results ---------- */
.nb-result {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: var(--ink);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 10px 0;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
    transition: transform .12s, box-shadow .15s, background .15s;
}
.nb-result:hover {
    transform: translateY(-2px);
    background: #f4f8ff;
    box-shadow: 0 10px 24px rgba(59, 91, 219, .22);
}
.nb-result:active { transform: scale(.98); background: #eef3ff; }
.nb-result .name { flex: 1; font-weight: 700; font-size: 15px; color: var(--ink); }
.nb-result img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef1f6;
}

/* ---------- nobat chips (empty appointments) ---------- */
.nb-chips {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 2px 14px;
    scroll-snap-type: x proximity;
}
/* hide the horizontal scrollbar (cross-browser) — scrolling still works */
.nb-chips { scrollbar-width: none; -ms-overflow-style: none; }
.nb-chips::-webkit-scrollbar { display: none; }
.nb-chip {
    scroll-snap-align: start;
    min-width: 150px;
    background: linear-gradient(160deg, var(--chip), var(--chip2));
    color: #eef3ff;
    border-radius: 16px;
    padding: 12px 14px;
    text-align: center;
    cursor: pointer;
    line-height: 1.7 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
    transition: transform .1s, box-shadow .15s;
    border: 1px solid rgba(255,255,255,.06) !important;
}
.nb-chip:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.3); }
.nb-chip .wd { font-weight: 700; font-size: 14px; }
.nb-chip .dt { font-size: 12px; opacity: .8; }
.nb-chip .tm { font-size: 16px; font-weight: 800; direction: ltr; margin-top: 2px; }

/* ---------- empty-nobats panel + line renderer (shared by shop/line pages) ---------- */
.nobat-panel { background: #fff; border-radius: 18px; margin: 8px 0 12px -16px; border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 14px 14px 14px 0; box-shadow: #00000070 0px 10px 25px; overflow: hidden; }
.nobat-panel .nb-chips { padding: 2px 0; margin: 0; }
.nobat-panel .nb-empty { color: #6b7385; padding: 8px 16px; }
.nobat-panel.empty { margin-left: 0; border-top-left-radius: 18px; border-bottom-left-radius: 18px; }
.lb-perf { margin-top: 18px; }
.lb-perf-head { font-weight: 800; font-size: 16px; color: #eaf0fb; margin-bottom: 6px; }
.lb-perf-head i { color: #b9a7f5; margin-left: 6px; }
.lb-perf-head .lb-rate { color: var(--gold); font-weight: 700; font-size: 13px; margin-right: 6px; }
.lb-perf-sum { color: rgba(255,255,255,.72); font-weight: 400; font-size: 12.5px; margin-top: 3px; }

/* ---------- calendar modal (shared) ---------- */
.cal-modal { max-width: 380px; position: relative; padding-top: 46px; z-index: 1001; }
@media (max-width: 560px) { #lbCalModal { padding: 8px; } .cal-modal { max-width: 100%; } }
.modal-x { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; background: #eef1f6; color: #2a3346; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; font-weight: 800; line-height: 1 !important; }
.modal-x:hover { background: #dfe4ee; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.cal-head .t { font-weight: 800; font-size: 17px; }
.cal-nav { background: #eef1f6; border-radius: 10px; padding: 6px 13px; cursor: pointer; color: #2a3346; font-weight: 800; font-size: 16px; border: none; }
.cal-nav[disabled] { opacity: .35; cursor: default; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid { max-height: 54vh; overflow-y: auto; }
.cal-weekdays { color: #6b7385; font-size: 12px; margin-bottom: 6px; }
.cal-weekdays span { text-align: center; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; color: #aeb6c5; }
.cal-cell.empty { visibility: hidden; }
.cal-cell.has { background: linear-gradient(160deg, #2f9e44, #2b8a3e); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 4px 10px rgba(47,158,68,.3); }
.cal-cell.has:hover { filter: brightness(1.12); }
.day-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.day-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 46vh; overflow-y: auto; padding-bottom: 2px; }
.day-time { background: linear-gradient(160deg, #2b3a55, #243049); color: #eef3ff; border-radius: 12px; padding: 12px 4px; text-align: center; cursor: pointer; font-weight: 800; direction: ltr; }
.day-time:hover { filter: brightness(1.15); }

/* ---------- stars ---------- */
.nb-stars { text-align: center; font-size: 26px; color: var(--gold); letter-spacing: 6px; margin: 40px 0 0; }

/* ---------- bottom fixed bar ---------- */
.nb-bottombar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(40, 50, 74, .96);
    backdrop-filter: blur(6px);
    box-shadow: 0 -2px 14px rgba(0, 0, 0, .2);
}
.nb-bottombar a {
    color: #cfe8d5;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.nb-bottombar a .ck { color: var(--green); }

/* ---------- money / deposit ---------- */
.nb-money { color: var(--green); font-weight: 800; }

/* ---------- toast ---------- */
.nb-toast {
    position: fixed;
    top: 20px;
    right: 50%;
    transform: translateX(50%);
    background: #d9480f;
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    z-index: 60;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    animation: nbpop .25s ease;
}
@keyframes nbpop { from { opacity: 0; transform: translateX(50%) translateY(-8px); } }

/* hide the native number-input spinner arrows (custom-styled inputs) */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- OTP boxes ---------- */
.nb-otp { display: flex; gap: 10px; justify-content: center; direction: ltr; margin: 16px 0; }
.nb-otp input {
    width: 54px;
    height: 64px;
    border-radius: 12px;
    border: 2px solid #c7cede !important;
    background: #f7f9fc;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
}
.nb-otp input:focus { border-color: var(--green) !important; }

/* ---------- form ---------- */
.nb-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f9fc;
    border: 2px solid #c7cede !important;
    border-radius: 14px;
    padding: 4px 14px;
    margin: 14px 0;
    transition: border-color .15s, box-shadow .15s;
}
.nb-field:focus-within {
    border-color: var(--accent1) !important;
    box-shadow: 0 0 0 3px rgba(59, 91, 219, .15);
}
.nb-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 4px;
    font-size: 16px;
    color: var(--ink);
    direction: ltr;
    text-align: left;
}
.nb-field .ic { color: var(--muted); font-size: 18px; }
.nb-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin: 6px 2px 14px; }

.nb-muted { color: var(--muted); font-size: 14px; line-height: 1.9 !important; }
.nb-center { text-align: center; }
.nb-hidden { display: none !important; }

/* ---------- modal ---------- */
.nb-modal-back {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 24, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
    padding: 22px;
}
.nb-modal {
    background: #fff;
    color: var(--ink);
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}
.nb-modal h3 { font-size: 18px; margin-bottom: 12px; }

/* ---------- confirm hero ---------- */
.nb-hero {
    background: linear-gradient(160deg, #b197fc, #7048e8);
    border-radius: 22px;
    padding: 26px;
    text-align: center;
    margin: 16px 0;
    box-shadow: 0 12px 30px rgba(112, 72, 232, .4);
}
.nb-hero .emoji { font-size: 72px; }
.nb-hero .ttl { font-size: 18px; font-weight: 800; margin-top: 10px; }

/* ---------- list rows (panels) ---------- */
.nb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: var(--ink);
    border-radius: 16px;
    padding: 14px;
    margin: 10px 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
}
.nb-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #eef1f6; }
.nb-row .grow { flex: 1; }
.nb-row .big { font-weight: 800; font-size: 15px; }
.nb-row .sub { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.7 !important; }
.nb-badge {
    background: #eef3ff;
    color: var(--accent1);
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 13px;
    direction: ltr;
}
.nb-empty { text-align: center; color: rgba(255,255,255,.85); padding: 30px 10px; font-size: 15px; }

/* ---------- swiper nav arrows (override the bundled defaults, all pages) ---------- */
.swiper-button-prev, .swiper-rtl .swiper-button-next { left: 10px; }
.swiper-button-prev::after, .swiper-rtl .swiper-button-next::after { font-size: 35px; }
