/* === Виджет онлайн-записи === */

/* Модальное окно */
#booking-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
}
.booking-modal__overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
}
.booking-modal__content {
    position: relative;
    max-width: 520px;
    width: 95%;
    margin: 60px auto;
    background: var(--dark-color, #282828);
    border-radius: 12px;
    max-height: 85vh;
    overflow-y: auto;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.booking-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.booking-modal__header h3 {
    font-family: "Poppins", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}
.booking-modal__close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}
.booking-modal__close:hover { color: #fff; }
.booking-modal__body {
    padding: 20px 24px 24px;
}

/* Breadcrumbs (шаги) */
.booking-breadcrumbs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}
.booking-breadcrumb {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    transition: background 0.3s;
}
.booking-breadcrumb.done { background: var(--accent-color, #D4AF37); }
.booking-breadcrumb.active { background: var(--accent-color, #D4AF37); opacity: 0.6; }

/* Шаг 1: Услуги */
.booking-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.booking-service-item:hover {
    border-color: var(--accent-color, #D4AF37);
    background: rgba(212,175,55,0.05);
}
.booking-service-item.active {
    border-color: var(--accent-color, #D4AF37);
    background: rgba(212,175,55,0.1);
}
.booking-service-item__name {
    font-weight: 500;
    font-size: 0.95rem;
    display: block;
}
.booking-service-item__desc {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-top: 3px;
}
.booking-service-item__right {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}
.booking-service-item__price {
    font-weight: 600;
    color: var(--accent-color, #D4AF37);
    display: block;
}
.booking-service-item__dur {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-top: 2px;
}

/* Шаг 2: Календарь */
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.cal-title {
    font-weight: 600;
    font-size: 1rem;
    text-transform: capitalize;
}
.cal-prev, .cal-next {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-prev:hover, .cal-next:hover {
    border-color: var(--accent-color, #D4AF37);
    color: var(--accent-color, #D4AF37);
}
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.cal-day:hover:not(.disabled):not(.empty) {
    border-color: var(--accent-color, #D4AF37);
}
.cal-day.today {
    border-color: rgba(255,255,255,0.3);
}
.cal-day.selected {
    background: var(--accent-color, #D4AF37);
    color: #000;
    font-weight: 600;
}
.cal-day.disabled {
    color: #444;
    cursor: default;
}
.cal-day.empty {
    cursor: default;
}

/* Шаг 3: Слоты времени */
.booking-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.booking-slot {
    padding: 10px 4px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: none;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.booking-slot:hover:not(.taken) {
    border-color: var(--accent-color, #D4AF37);
    background: rgba(212,175,55,0.1);
}
.booking-slot.selected {
    background: var(--accent-color, #D4AF37);
    color: #000;
    font-weight: 600;
    border-color: var(--accent-color, #D4AF37);
}
.booking-slot.taken {
    color: #555;
    text-decoration: line-through;
    cursor: default;
    border-color: rgba(255,255,255,0.05);
}

/* Шаг 4: Подтверждение */
.booking-confirm {
    text-align: center;
}
.booking-confirm__detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.9rem;
}
.booking-confirm__label { color: #888; }
.booking-confirm__value { font-weight: 500; }
#booking-notes {
    width: 100%;
    margin-top: 15px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}
#booking-notes::placeholder { color: #666; }
#booking-notes:focus { border-color: var(--accent-color, #D4AF37); outline: none; }

.booking-confirm-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: var(--accent-color, #D4AF37);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.booking-confirm-btn:hover {
    background: #c9a030;
    transform: translateY(-1px);
}
.booking-confirm-btn:disabled {
    background: #666;
    cursor: wait;
}

/* Кнопка назад */
.booking-back {
    background: none;
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.booking-back:hover { color: #fff; }

/* Успех */
.booking-success {
    text-align: center;
    padding: 20px 0;
}
.booking-success i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 15px;
}
.booking-success h3 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    margin-bottom: 15px;
}
.booking-success p {
    margin-bottom: 5px;
    color: #ccc;
}
.booking-success__note {
    color: var(--accent-color, #D4AF37) !important;
    margin-top: 15px !important;
}
.booking-close-btn {
    margin-top: 20px;
    padding: 10px 30px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.booking-close-btn:hover { border-color: #fff; }

/* Общие */
.booking-empty, .booking-hint, .booking-loading {
    text-align: center;
    color: #888;
    padding: 20px 0;
    font-size: 0.9rem;
}
.booking-step-title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Адаптив */
@media (max-width: 520px) {
    .booking-modal__content {
        margin: 20px auto;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
    .booking-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
