/**
 * BeautyNet — رزرو نوبت لوکس (روز + ساعت)
 */
.bk-widget--lux {
    --bk-green: var(--bn-green-deep, #2a4636);
    --bk-green-mid: var(--bn-green, #355944);
    --bk-gold: var(--bn-gold, #c6a969);
    --bk-cream: var(--bn-cream, #f7f3ee);
    --bk-border: var(--bn-border, rgba(53, 89, 68, 0.1));
    --bk-text-3: var(--bn-text-3, #999);
    background: #fff;
    border: 1px solid var(--bk-border);
    border-radius: clamp(20px, 4vw, 28px);
    box-shadow: 0 20px 56px rgba(16, 37, 29, 0.1);
    overflow: hidden;
}

.bk-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(14px, 3vw, 18px) clamp(16px, 3vw, 20px);
    background: linear-gradient(135deg, rgba(15, 76, 58, 0.08), rgba(201, 164, 94, 0.1));
    border-bottom: 1px solid var(--bk-border);
}

.bk-widget-header img {
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(201, 164, 94, 0.35);
}

.bk-widget-header__text {
    flex: 1;
    min-width: 0;
}

.bk-widget-header h3 {
    margin: 0 0 2px;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    font-weight: 800;
    color: var(--bk-green);
}

.bk-widget-header p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--bk-text-3);
}

.bk-fee-badge {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 76, 58, 0.12), rgba(26, 107, 82, 0.08));
    color: var(--bk-green);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

/* ── Picker ── */
.bk-picker {
    padding: clamp(12px, 2.5vw, 16px) clamp(14px, 3vw, 18px) clamp(8px, 2vw, 12px);
}

.bk-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.bk-picker-head h4,
.bk-slots-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--bk-green);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bk-picker-meta {
    font-size: 0.72rem;
    color: var(--bk-text-3);
    font-weight: 600;
}

.bk-day-strip-wrap {
    margin: 0 -4px 14px;
    padding: 2px 0;
}

.bk-day-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 2px 8px;
}

.bk-day-strip::-webkit-scrollbar {
    display: none;
}

.bk-day-pill {
    flex: 0 0 auto;
    scroll-snap-align: center;
    min-width: 72px;
    padding: 10px 12px;
    border: 1px solid var(--bk-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bk-day-pill__wd {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--bk-text-3);
}

.bk-day-pill__day {
    display: block;
    font-size: 0.88rem;
    font-weight: 900;
    color: var(--bk-green);
    margin: 2px 0;
}

.bk-day-pill__count {
    display: block;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 700;
    color: var(--bk-gold);
}

.bk-day-pill.is-active {
    border-color: var(--bk-green);
    background: linear-gradient(145deg, var(--bk-green), var(--bk-green-mid));
    box-shadow: 0 10px 24px rgba(15, 76, 58, 0.22);
    transform: translateY(-2px);
}

.bk-day-pill.is-active .bk-day-pill__wd,
.bk-day-pill.is-active .bk-day-pill__day,
.bk-day-pill.is-active .bk-day-pill__count {
    color: #fffaf2;
}

.bk-slots-section {
    margin-top: 4px;
}

.bk-slots-title {
    margin-bottom: 10px;
}

.bk-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: min(36vh, 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px;
}

.bk-time-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--bk-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, var(--bk-cream));
    color: var(--bk-green);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bk-time-chip:hover {
    border-color: var(--bk-green-mid);
    box-shadow: 0 6px 16px rgba(15, 76, 58, 0.12);
}

.bk-time-chip.is-selected {
    background: linear-gradient(135deg, var(--bk-green), var(--bk-green-mid));
    color: #fffaf2;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(15, 76, 58, 0.28);
}

.bk-time-chip__time {
    line-height: 1.2;
}

/* ── Summary dock ── */
.bk-summary--dock {
    padding: 12px clamp(14px, 3vw, 18px) clamp(14px, 3vw, 18px);
    background: linear-gradient(180deg, var(--bk-cream), #fff);
    border-top: 1px solid var(--bk-border);
}

.bk-summary.hidden {
    display: none;
}

.bk-summary-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-summary-pick {
    flex: 1;
    min-width: 0;
}

.bk-summary-pick small {
    display: block;
    font-size: 0.68rem;
    color: var(--bk-text-3);
    font-weight: 700;
}

.bk-summary-pick strong {
    display: block;
    font-size: 0.82rem;
    color: var(--bk-green);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-confirm-btn--compact {
    flex-shrink: 0;
    width: auto;
    min-width: 120px;
    padding: 12px 18px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bk-green), var(--bk-green-mid));
    color: #fffaf2;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 22px rgba(15, 76, 58, 0.25);
}

.bk-confirm-btn--compact:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.bk-summary-more {
    margin-top: 10px;
}

.bk-summary-more summary {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bk-text-3);
    cursor: pointer;
    list-style: none;
}

.bk-summary-more summary::-webkit-details-marker {
    display: none;
}

.bk-notes {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--bk-border);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    min-height: 56px;
    resize: vertical;
}

.bk-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.68rem;
    color: var(--bk-text-3);
}

.bk-empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--bk-text-3);
}

.bk-empty-state--inline {
    padding: 24px 12px;
    grid-column: 1 / -1;
}

.bk-empty-state i {
    font-size: 2rem;
    color: var(--bk-gold);
    margin-bottom: 8px;
    opacity: 0.85;
}

.bk-empty-state h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: var(--bk-green);
}

.bk-loading {
    text-align: center;
    padding: 40px;
    color: var(--bk-text-3);
}

.bk-location-success {
    margin: 12px 16px 16px;
    padding: 12px;
    border-radius: 16px;
    background: var(--bk-cream);
    border: 1px solid var(--bk-border);
}

/* ── Doctor schedule (lux) ── */
.bk-schedule-lux {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: min(50vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bk-schedule-day {
    border-radius: 18px;
    border: 1px solid var(--bk-border);
    background: rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

.bk-schedule-day__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(15, 76, 58, 0.08), transparent);
    font-size: 0.82rem;
}

.bk-schedule-day__head strong {
    color: var(--bk-green);
    font-weight: 800;
}

.bk-schedule-day__head span {
    color: var(--bk-text-3);
    font-size: 0.72rem;
    font-weight: 700;
}

.bk-schedule-day__slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 12px;
}

.bk-schedule-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 76, 58, 0.06);
    border: 1px solid var(--bk-border);
    font-size: 0.78rem;
}

.bk-schedule-chip.is-booked {
    background: rgba(192, 57, 43, 0.08);
    border-color: rgba(192, 57, 43, 0.2);
}

.bk-schedule-chip__time {
    font-weight: 800;
    color: var(--bk-green);
}

.bk-schedule-chip.is-booked .bk-schedule-chip__time {
    color: #8b4513;
}

.bk-schedule-chip__status {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--bk-green-mid);
}

.bk-schedule-chip.is-booked .bk-schedule-chip__status {
    color: #c0392b;
}

.bk-schedule-chip__del {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(192, 57, 43, 0.12);
    color: #c0392b;
    cursor: pointer;
    display: grid;
    place-items: center;
}

/* ── Modal ── */
.bk-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(16, 37, 29, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overscroll-behavior: none;
    touch-action: none;
}

.bk-modal.open {
    display: flex;
}

body.bk-booking-locked,
body.bn-modal-open.bk-booking-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none;
}

.bk-modal-content {
    width: 100%;
    max-width: 480px;
    max-height: min(94dvh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -12px 40px rgba(16, 37, 29, 0.22);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    animation: bkSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.bk-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--bk-border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.bk-modal-head h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--bk-green);
    font-weight: 800;
}

.bk-modal-close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--bk-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

@keyframes bkSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Booking page */
.bn-booking-page {
    max-width: 480px;
    margin-inline: auto;
}

.bn-booking-page #bookingWidgetRoot {
    margin-top: 8px;
}

@media (min-width: 600px) {
    .bk-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        max-height: 260px;
    }

    .bk-day-pill {
        min-width: 80px;
    }
}

@media (min-width: 1024px) {
    .bn-booking-page {
        max-width: 520px;
    }

    .bk-modal-content {
        border-radius: 28px;
        margin-bottom: 24px;
    }

    .bk-modal.open {
        align-items: center;
        padding: 20px;
    }
}

/* مودال لوکس کلینیک — بزرگ و وسط صفحه */
.bk-modal--lux.bk-modal.open {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bk-modal--lux .bk-modal-content {
    width: min(920px, 96vw);
    max-width: 920px;
    max-height: min(92dvh, 880px);
    border-radius: 28px;
    box-shadow:
        0 32px 80px rgba(16, 37, 29, 0.28),
        0 0 0 1px rgba(198, 169, 105, 0.18);
    animation: bkModalLuxIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.bk-modal--lux .bk-modal-head {
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(247, 243, 238, 0.9), #fff);
}

.bk-modal--lux .bk-modal-head h2 {
    font-size: 1.15rem;
    font-weight: 900;
}

.bk-modal--clinic .bk-widget--lux {
    padding: 8px 12px 20px;
}

@keyframes bkModalLuxIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .bk-modal--lux.bk-modal.open {
        align-items: flex-end;
        padding: 0;
    }
    .bk-modal--lux .bk-modal-content {
        width: 100%;
        max-height: 96dvh;
        border-radius: 28px 28px 0 0;
    }
}

/* Office selection step (doctor profile — office only) */
.bk-office-step {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--bk-border);
    background: linear-gradient(180deg, rgba(247, 243, 238, 0.65), transparent);
}

.bk-office-step__head,
.bk-office-step__next {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-office-step__head h4 {
    margin: 0;
    font-size: 0.92rem;
    color: var(--bk-green);
}

.bk-office-step__head p,
.bk-office-step__next span:last-child {
    margin: 2px 0 0;
    font-size: 0.76rem;
    color: var(--bk-text-3);
}

.bk-step-badge {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bk-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.bk-office-cards {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.bk-office-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--bk-border);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bk-office-card--active.is-selected {
    border-color: rgba(53, 89, 68, 0.42);
    box-shadow: 0 8px 24px rgba(16, 37, 29, 0.08);
}

.bk-office-card--clinic {
    opacity: 0.92;
    background: rgba(255, 255, 255, 0.72);
}

.bk-office-card__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(53, 89, 68, 0.08);
    color: var(--bk-green);
    flex-shrink: 0;
}

.bk-office-card__body {
    flex: 1;
    min-width: 0;
}

.bk-office-card__body strong {
    display: block;
    font-size: 0.88rem;
}

.bk-office-card__body small {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--bk-text-3);
}

.bk-office-card__check {
    color: var(--bk-green);
}

.bk-office-card__arrow {
    color: var(--bk-text-3);
    font-size: 0.8rem;
}

.bk-office-step__next {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed rgba(53, 89, 68, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bk-green);
}

/* احراز هویت نوبت */
.bk-id-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    overscroll-behavior: none;
}
.bk-id-modal.open { display: flex; }
.bk-id-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 24, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.bk-id-modal__panel {
    position: relative;
    width: min(440px, 100%);
    max-height: 90vh;
    overflow: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    border-radius: 18px 18px 12px 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    padding: 16px;
    transform: translateZ(0);
}
.bk-id-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.bk-id-modal__head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--bk-green);
}
.bk-id-modal__close {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--bk-text-3);
}
.bk-id-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.82rem;
    font-weight: 600;
}
.bk-id-commit {
    display: flex !important;
    gap: 8px;
    align-items: flex-start;
    font-weight: 500 !important;
    line-height: 1.5;
}
.bk-id-slot {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(53, 89, 68, 0.08);
    font-size: 0.85rem;
    font-weight: 700;
}
.bk-id-hint {
    font-size: 0.85rem;
    color: var(--bk-text-2);
    margin: 0 0 12px;
}
.bk-id-otp-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 12px;
}
.bk-id-otp { letter-spacing: 0.2em; text-align: center; font-weight: 800; }
.bk-id-resend, .bk-id-back {
    border: none;
    background: transparent;
    color: var(--bk-green);
    font-size: 0.82rem;
    cursor: pointer;
    margin-top: 8px;
}
.bk-fee-badge--free {
    background: rgba(53, 89, 68, 0.12);
    color: var(--bk-green);
}
.bk-pay-disabled {
    opacity: 0.55;
    pointer-events: none;
    text-decoration: line-through;
}
