/* Стили для агрегатора шиномонтажек */
/* Цветовая схема: светло синий + светло красный (в стиле zoon.ru) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap');

/* ─── CSS-переменные темы ──────────────────────────────────── */
:root {
    --blue:        #3B82F6;
    --blue-dark:   #1D4ED8;
    --blue-light:  #EFF6FF;
    --blue-mid:    #DBEAFE;
    --red:         #EF4444;
    --red-light:   #FEF2F2;
    --red-dark:    #DC2626;
    --text:        #0F172A;
    --text-muted:  #475569;
    --border:      #E2E8F0;
    --bg:          #F8FAFF;
    --white:       #FFFFFF;
    --shadow-sm:   0 1px 4px rgba(59,130,246,.08);
    --shadow-md:   0 4px 16px rgba(59,130,246,.12);
    --shadow-lg:   0 8px 32px rgba(59,130,246,.16);
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
}

@font-face {
    font-family: 'Acherus Feral';
    src: url('../fonts/ofont.ru_Acherus%20Feral.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Acherus Feral', system-ui, sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    color: #0F172A;
}

body.service-modal-open {
    overflow: hidden;
}

/* Обёртка агрегатора */
.aggregator-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Боковая панель */
.info-sidebar {
    width: 50%;
    background: #ffffff;
    box-shadow: -2px 0 20px rgba(59,130,246,.12);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 0 12px 0 16px;
    background: #ffffff;
    color: #0F172A;
    border-bottom: 1.5px solid #E2E8F0;
    box-shadow: 0 2px 10px rgba(59,130,246,.08);
    position: relative;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.btn-other-service {
    flex-shrink: 0;
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #93C5FD;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1.3;
}
.btn-other-service:hover {
    background: #E0E7FF;
    border-color: #A5B4FC;
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}
.sidebar-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../../logo.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}
.sidebar-content > * {
    position: relative;
    z-index: 1;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

/* ─── Предстоящие записи ───────────────────────────────────── */
.upcoming-bookings-block {
    background: #f0faf4;
    border: 1.5px solid #b7e4c7;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.upcoming-bookings-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #059669;
    margin: 0 0 10px 0;
}

.upcoming-booking-item {
    border-top: 1px solid #d5f0df;
    padding: 8px 0 4px;
}

.upcoming-booking-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.upcoming-booking-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.upcoming-booking-info strong {
    font-size: 0.92rem;
    color: #0F172A;
}

.upcoming-booking-info span {
    font-size: 0.85rem;
    color: #475569;
}

.upcoming-booking-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.upcoming-booking-actions {
    display: flex;
    flex-shrink: 0;
    align-self: center;
    gap: 12px;
}

.upcoming-map-btn {
    background: none;
    border: 2px solid #3B82F6;
    color: #3B82F6;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.9rem;
    font-family: 'Acherus Feral', sans-serif;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.upcoming-map-btn:hover {
    background: #3B82F6;
    color: #fff;
}

.upcoming-cancel-btn {
    flex-shrink: 0;
    background: none;
    border: 2px solid #EF4444;
    color: #EF4444;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.9rem;
    font-family: 'Acherus Feral', sans-serif;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.upcoming-cancel-btn:hover {
    background: #EF4444;
    color: #fff;
}

.upcoming-cancel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.welcome-text {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 30px;
    line-height: 1.6;
}

.sidebar-details {
    min-height: 0;
}

.service-modal {
    position: absolute;
    inset: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.service-modal.active {
    display: flex;
}

.service-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 10px;
}

.service-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 100%;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(59,130,246,.18);
    padding: 28px;
    z-index: 1;
}

.service-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    color: #0F172A;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.service-modal-close:hover {
    background: rgba(15, 23, 42, 0.12);
}

.service-modal-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.service-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.service-modal-title {
    font-size: 2rem;
    line-height: 1.1;
    color: #0F172A;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.service-modal-subtitle {
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.service-modal-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-modal-info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.service-modal-info-item strong {
    display: block;
    margin-bottom: 4px;
    color: #0F172A;
    font-weight: 600;
}

.service-modal-info-item p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.service-modal-info-item a {
    color: #3B82F6;
    font-weight: 600;
    text-decoration: none;
}

.service-modal-info-item a:hover {
    text-decoration: underline;
}

.service-modal-icon {
    font-size: 1.3rem;
    line-height: 1;
    margin-top: 2px;
}

.service-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Acherus Feral', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-modal-btn:hover {
    transform: translateY(-2px);
}

.service-modal-btn-primary {
    background: #10B981;
    color: #fff;
    box-shadow: 0 8px 20px rgba(59,130,246,.25);
}

.service-modal-btn-primary:hover {
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.35);
}

.service-modal-btn-secondary {
    background: #EFF6FF;
    color: #1D4ED8;
}

.service-modal-btn-secondary:hover {
    background: #E0E7FF;
}

.legend-icon {
    font-size: 1.2rem;
}

.legend-green {
    color: #10B981;
}

.legend-gray {
    color: #94A3B8;
}

/* Информация о точке */
.point-info {
    padding: 20px;
}

.point-info h3 {
    color: #0F172A;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.point-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #E2E8F0;
}

.point-info-item:last-child {
    border-bottom: none;
}

.point-info-icon {
    font-size: 1.2rem;
    min-width: 24px;
}

.point-info-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.point-info-label {
    font-weight: 600;
    color: #0F172A;
}

.no-subdomain-notice {
    background: #FEF9EC;
    border: 1.5px solid #FDE68A;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #92400E;
    line-height: 1.6;
}
.no-subdomain-notice a {
    color: #1D4ED8;
    font-weight: 600;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1.5px solid #E2E8F0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    height: 54px;
    background: #FAFBFF;
}

.footer-link {
    color: #3B82F6;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-link:hover {
    color: #1D4ED8;
}

.footer-divider {
    color: #CBD5E1;
}

/* Основной контент */
.main-content {
    margin-right: 50%;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Верхняя панель */
.top-bar {
    background: #ffffff;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(59,130,246,.1);
    z-index: 50;
    min-height: 54px;
    border-bottom: 2px solid #EFF6FF;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3B82F6;
}

.location-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    background: #3B82F6;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    line-height: 34px;
    text-align: center;
    font-family: 'Acherus Feral', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.map-hint-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.map-hint {
    color: #0F172A;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

/* Карта */
.aggregator-map {
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Легенда под картой */
.map-legend {
    background: #ffffff;
    padding: 15px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.05);
    z-index: 50;
    height: 54px;
    border-top: 2px solid #EFF6FF;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 0.95rem;
}

.legend-icon {
    font-size: 1rem;
}

.legend-green {
    color: #10B981;
}

.legend-gray {
    color: #94A3B8;
}

/* Сообщение для неподключенных точек */
.unregistered-message {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFBEB;
    border: 2px solid #F59E0B;
    border-radius: 10px;
    padding: 15px 25px;
    color: #92400E;
    font-size: 0.95rem;
    text-align: center;
    z-index: 50;
    max-width: 500px;
}

.register-link {
    display: inline-block;
    margin-top: 8px;
    color: #92400E;
    font-weight: 700;
    text-decoration: underline;
}

.register-link:hover {
    text-decoration: none;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .info-sidebar {
        width: 350px;
        right: 0;
    }

    .main-content {
        margin-right: 350px;
    }
}

@media (max-width: 768px) {
    /* ── Базовая раскладка — без скролла ── */
    .aggregator-wrapper {
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }

    /* Основной контент — flex-колонка, заполняет всё доступное */
    .main-content {
        margin-right: 0;
        margin-left: 0;
        flex: 1 1 0;
        height: auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* Верхняя панель — одна строка, фиксированная высота */
    .top-bar {
        flex: none;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 12px;
        height: 48px;
        min-height: 48px;
        align-items: center;
    }

    .filter-group {
        flex: 1;
        min-width: 0;
    }

    .map-hint { display: none; }

    .map-hint-actions { flex: none; }

    /* Кнопка геолокации */
    .location-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        line-height: 44px;
        border-radius: 12px;
    }

    /* Порядок элементов: фильтр → легенда → карта */
    .top-bar        { order: 1; }
    .map-legend     { order: 2; }
    .aggregator-map { order: 3; flex: 1; min-height: 0; height: auto; }

    /* Легенда — компактная полоска под фильтром */
    .map-legend {
        flex: none;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 16px;
        padding: 0 12px;
        height: 32px;
        min-height: 32px;
        border-top: none;
        border-bottom: 1px solid #EFF6FF;
        background: #fff;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    /* Блок записей — скрыт по умолчанию */
    .upcoming-bookings-mobile {
        display: none !important;
    }

    /* Скрываем дублирующий блок в сайдбаре */
    #myUpcomingBookings { display: none; }

    /* ── Есть записи — нижний лист (bottom sheet) ── */

    /* Карта и легенда остаются на месте, снизу добавляем отступ под ручку */
    .main-content.has-bookings {
        padding-bottom: 52px;
    }

    /* Сам лист — position:fixed, прижат к низу экрана */
    .main-content.has-bookings .upcoming-bookings-mobile {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 52px;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.14);
        z-index: 150;
        transition: height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        overflow: hidden;
    }

    /* Развёрнутый лист */
    .main-content.has-bookings .upcoming-bookings-mobile.sheet-expanded {
        height: 55dvh;
    }

    /* Ручка листа — всегда видна */
    .bookings-sheet-handle {
        height: 52px;
        display: flex;
        align-items: center;
        padding: 0 16px 0 14px;
        gap: 8px;
        cursor: pointer;
        user-select: none;
        position: relative;
        flex-shrink: 0;
        border-bottom: 1px solid #EFF6FF;
    }

    /* Полоска-индикатор сверху ручки */
    .sheet-drag-bar {
        position: absolute;
        top: 7px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(15, 23, 42, 0.14);
        border-radius: 2px;
    }

    .bookings-sheet-title {
        flex: 1;
        font-size: 0.88rem;
        font-weight: 700;
        color: #059669;
        margin-top: 5px;
    }

    .bookings-sheet-chevron {
        font-size: 0.7rem;
        color: #94A3B8;
        margin-top: 5px;
        transition: transform 0.35s;
    }

    .upcoming-bookings-mobile.sheet-expanded .bookings-sheet-chevron {
        transform: rotate(180deg);
    }

    /* Прокручиваемое содержимое листа */
    .bookings-sheet-content {
        height: calc(55dvh - 52px);
        overflow-y: auto;
        padding: 8px 12px 16px;
    }

    .bookings-sheet-content .upcoming-bookings-block {
        border: none;
        background: transparent;
        padding: 0;
        margin: 0;
    }

    .bookings-sheet-content .upcoming-booking-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 10px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        margin-bottom: 6px;
        border-top: 1px solid #e2e8f0;
    }

    .bookings-sheet-content .upcoming-booking-item:first-of-type {
        border-top: 1px solid #e2e8f0;
        padding-top: 8px;
    }

    .bookings-sheet-content .upcoming-booking-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .bookings-sheet-content .upcoming-booking-info strong {
        font-size: 0.88rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bookings-sheet-content .upcoming-booking-info span {
        font-size: 0.78rem;
        color: #475569;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bookings-sheet-content .upcoming-booking-actions {
        flex-direction: row;
        flex-shrink: 0;
        gap: 5px;
        align-self: center;
    }

    .bookings-sheet-content .upcoming-map-btn,
    .bookings-sheet-content .upcoming-route-btn,
    .bookings-sheet-content .upcoming-cancel-btn {
        width: auto;
        padding: 6px 9px;
        font-size: 0.76rem;
        border-radius: 7px;
        white-space: nowrap;
    }

    .unregistered-message {
        position: relative;
        bottom: 0; left: 0;
        transform: none;
        margin: 8px 12px;
        max-width: none;
    }

    /* ── Bottom sheet — боковая панель снизу ── */
    .info-sidebar {
        position: fixed;
        top: auto; right: auto;
        bottom: 0; left: 0;
        width: 100%;
        height: 75dvh;
        border-radius: 0;
        box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
        border-bottom: none;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        z-index: 200;
    }

    .info-sidebar.sidebar-active { transform: translateY(0); }

    .sidebar-header::before {
        content: '';
        display: block;
        width: 40px; height: 4px;
        background: rgba(15, 23, 42, 0.14);
        border-radius: 2px;
        margin: 0 auto 10px;
    }

    .sidebar-header {
        flex-direction: column;
        height: auto;
        padding: 12px 20px 10px;
    }

    .sidebar-title { font-size: 1rem; }

    .sidebar-close-btn {
        display: flex !important;
        position: absolute;
        top: 14px; right: 14px;
        width: 36px; height: 36px;
        border: none;
        border-radius: 50%;
        background: rgba(15, 23, 42, 0.07);
        color: #0F172A;
        font-size: 1.2rem;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s;
    }

    .sidebar-close-btn:hover { background: rgba(15, 23, 42, 0.13); }

    .sidebar-footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Модальное окно записи внутри панели */
    .service-modal {
        position: relative;
        inset: auto;
        margin-top: 0;
        display: none;
    }

    .service-modal.active { display: block; }

    .service-modal-backdrop { display: none; }

    .service-modal-dialog {
        padding: 20px 16px;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }

    .service-modal-title { font-size: 1.4rem; }

    .service-modal-actions { flex-direction: column; }

    .service-modal-btn { width: 100%; }

    .footer-link { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .sidebar-title {
        font-size: 0.9rem;
    }

    /* На маленьких экранах sidebar занимает ещё больше высоты */
    .info-sidebar {
        height: 78vh;
    }

    .footer-link {
        font-size: 0.8rem;
    }

    /* Имя сервиса в карточке */
    .service-modal-title {
        font-size: 1.2rem;
    }

    /* Временные слоты — побольше touch target */
    .bk-time-slot {
        padding: 8px 10px;
        font-size: 0.85rem;
        min-height: 36px;
    }

    /* Кнопка записи */
    .booking-submit-btn {
        height: 48px;
        font-size: 1rem;
    }
}

/* touch-устройства: увеличиваем tap targets */
@media (hover: none) and (pointer: coarse) {
    .bk-time-slot {
        min-height: 38px;
        min-width: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .booking-input {
        height: 46px;
        font-size: 1rem;
    }

    .sidebar-close-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ─── Форма бронирования в модальном окне агрегатора ─────────────────── */

.booking-form-section {
    border-top: 2px solid #EFF6FF;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.booking-form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

/* Телефон шиномонтажки в модале записи */
.bk-shop-phone {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 14px;
    padding: 6px 10px;
    background: #F8FAFC;
    border-left: 3px solid #3B82F6;
}
.bk-shop-phone a {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 600;
}
.bk-shop-phone a:hover { text-decoration: underline; }

/* Блок успешного бронирования */
.booking-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: rgba(16, 185, 129, 0.06);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    text-align: center;
}

.booking-success-icon {
    font-size: 2.8rem;
    line-height: 1;
}

.booking-success h4 {
    font-size: 1.2rem;
    color: #059669;
    margin: 0;
    font-weight: 700;
}

.booking-success p {
    color: #475569;
    margin: 0;
    font-size: 0.95rem;
}

/* Форма */
.aggregator-booking-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.booking-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.booking-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.booking-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.booking-input {
    height: 42px;
    padding: 0 12px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #0F172A;
    background: #FAFAFA;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    font-family: 'Acherus Feral', sans-serif;
}

.booking-input:focus {
    border-color: #3B82F6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Временные слоты */
.bk-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    min-height: 52px;
    align-items: flex-start;
    align-content: flex-start;
}

.bk-time-slot {
    padding: 6px 12px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid #E2E8F0;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Acherus Feral', sans-serif;
    color: #0F172A;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    user-select: none;
}

.bk-time-slot:hover:not(.booked) {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.08);
    color: #3B82F6;
}

.bk-time-slot.selected {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
}

.bk-time-slot.booked {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #CBD5E1;
    cursor: not-allowed;
    text-decoration: line-through;
}

.booking-hint {
    font-size: 0.88rem;
    color: #94A3B8;
    padding: 4px 2px;
    margin: 0;
}

.booking-hint.no-slots {
    color: #F59E0B;
}

/* Чекбокс перебортовки */
.booking-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.93rem;
    color: #475569;
    user-select: none;
}

.booking-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3B82F6;
    cursor: pointer;
    flex-shrink: 0;
}

/* Строка цены */
.booking-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
}

.booking-price-label {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.booking-price-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #3B82F6;
}

/* Блок ошибки */
.booking-error {
    display: none;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.06);
    border: 2px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    color: #DC2626;
    font-size: 0.9rem;
}

/* Кнопка записи */
.booking-submit-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    border-radius: 12px;
    margin-top: 4px;
    background: #3B82F6;
    border: none;
    color: #fff;
    font-weight: 700;
    font-family: 'Acherus Feral', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.booking-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.booking-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

@media (max-width: 480px) {
    .booking-field-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Кнопка «Маршрут» ─────────────────────────────────────── */
.upcoming-route-btn {
    flex-shrink: 0;
    background: none;
    border: 2px solid #10b981;
    color: #10b981;
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.upcoming-route-btn:hover,
.upcoming-route-btn:active {
    background: #10b981;
    color: #fff;
}

/* ─── Блок записей под картой (базовый — скрыт) ────────────── */
.upcoming-bookings-mobile {
    display: none;
}

/* Десктоп: upcoming-bookings-mobile скрыт — записи отображаются в правом сайдбаре */
@media (min-width: 769px) {
    .upcoming-bookings-mobile,
    .main-content.has-bookings .upcoming-bookings-mobile {
        display: none !important;
    }
}

/* ─── Рейтинг партнёра (сайдбар) ───────────────────────────── */
.point-info-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    font-size: 0.9rem;
}
.rating-loading { color: #94A3B8; font-size: 0.85rem; }
.rating-no-reviews { color: #94A3B8; font-size: 0.85rem; font-style: italic; }
.rating-avg { display: flex; gap: 1px; }
.rating-avg-num { font-weight: 700; color: #0F172A; }
.rating-count { color: #64748B; font-size: 0.82rem; }

.star-display { font-size: 16px; color: #D1D5DB; }
.star-display.filled { color: #FBBF24; }

/* ─── Прошедшие записи / блок оценки ───────────────────────── */
.past-bookings-block {
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.past-booking-item {
    padding: 10px 0;
    border-bottom: 1px solid #FEF3C7;
    transition: opacity 0.4s ease;
}
.past-booking-item:last-child { border-bottom: none; }
.past-booking-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 8px;
}
.past-booking-info strong { color: #0F172A; font-size: 0.95rem; }
.past-booking-rating { display: flex; flex-direction: column; gap: 6px; }
.past-rating-label { font-size: 0.82rem; color: #92400E; font-weight: 600; }

.rating-stars { display: flex; gap: 4px; }
.rating-star {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #D1D5DB;
    transition: color 0.15s, transform 0.1s;
    padding: 0;
    line-height: 1;
}
.rating-star:hover,
.rating-star.active { color: #FBBF24; transform: scale(1.15); }

.rating-review-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.rating-review-input {
    width: 100%;
    border: 1.5px solid #FDE68A;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}
.rating-review-input:focus { border-color: #F59E0B; }

.rating-submit-btn {
    align-self: flex-start;
    background: #F59E0B;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.rating-submit-btn:hover { background: #D97706; }
.rating-submit-btn:disabled { background: #94A3B8; cursor: not-allowed; }

.past-booking-done {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10B981;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 0;
}

.btn-report-service {
    background: none;
    border: 1px solid #e0e0e0;
    color: #999;
    font-size: .76rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.btn-report-service:hover {
    color: #e67e22;
    border-color: #e67e22;
}
