/* ==========================================================================
   BOOKING + SOCIAL: Гибридная дизайн-система
   Booking.com профессионализм + ВКонтакте социальность
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Map Legacy Variables to UI Factory Tokens */
    --booking-blue: var(--kaz-blue);
    --booking-blue-dark: var(--kaz-blue-dark);
    --booking-blue-light: var(--kaz-blue-light);
    --booking-yellow: var(--kaz-yellow);
    --booking-bg: var(--kaz-gray-100);
    --booking-white: var(--kaz-light);

    /* Text Colors */
    --text-primary: var(--kaz-dark);
    --text-secondary: var(--kaz-gray-500);
    --text-light: var(--kaz-gray-400);

    /* Borders & Shadows */
    --border-color: var(--kaz-gray-200);
    --shadow-sm: var(--shadow-sm);
    --shadow-md: var(--shadow-md);
    --shadow-lg: var(--shadow-lg);

    /* Layout */
    --header-height: 64px;
    --sidebar-width: 240px;

    /* Radius Sync */
    --radius-sm: var(--radius-sm);
    --radius-md: var(--radius-md);
    --radius-lg: var(--radius-lg);

    /* Transitions */
    --transition: var(--transition-premium);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--booking-bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* Stats Redesign */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.stat-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--booking-blue-dark);
}

.stat-card__label {
    font-size: 13px;
    color: #6a6a6a;
}

.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    animation: revealIn 0.6s forwards;
}

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-item {
    padding: 10px 16px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: #f8f9fa;
}

.pulse-live {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Header */
.booking-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--kaz-blue) 0%, var(--kaz-blue-light) 100%);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
}

.booking-header__logo {
    color: white;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.booking-header__logo:hover {
    transform: scale(1.02);
    color: white;
}

/* Redesigned Search Bar - Pill Style */
.booking-header__search {
    display: flex;
    background: rgba(255, 255, 255, 1);
    border-radius: 50px;
    padding: 4px;
    width: 100%;
    max-width: 500px;
    margin: 0 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.booking-header__search:focus-within {
    max-width: 540px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 53, 128, 0.2);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 16px;
}

.search-icon {
    color: #003580;
    font-size: 16px;
    margin-right: 10px;
}

.booking-header__input {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    width: 100%;
    font-weight: 500;
}

.booking-header__input::placeholder {
    color: #999;
}

.booking-header__btn {
    background: var(--kaz-yellow);
    color: var(--kaz-blue-dark);
    border: none;
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-premium);
    box-shadow: var(--shadow-sm);
}

.booking-header__btn:hover {
    background: #ffc82a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Associations Button - Premium Secondary */
.btn-associations {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(5px);
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-associations:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-associations i {
    font-size: 16px;
}

/* Currency Button */
.btn-currency {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-currency:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Auth Buttons */
.btn-auth-login {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-auth-login:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-auth-register {
    background: white;
    color: #003580;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-auth-register:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.booking-header__user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.booking-header__user:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.booking-header__user::after {
    display: none !important;
    /* Hide default Bootstrap chevron */
}

.booking-header__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
}

/* Layout Hierarchy */
.booking-layout {
    margin-top: var(--header-height);
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.booking-sidebar {
    width: var(--sidebar-width);
    background: var(--kaz-light);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 16px 0;
    z-index: 900;
    transition: var(--transition-premium);
}

/* Main Content Wrapper - Key for Fixed Sidebar */
.booking-page-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.booking-main-row {
    display: flex;
    flex: 1;
    width: 100%;
}

@media (max-width: 992px) {
    .booking-main-row {
        flex-direction: column;
    }

    .booking-right {
        width: 100% !important;
        padding: 16px !important;
        order: 2;
    }

    .booking-content {
        order: 1;
    }
}

.booking-content {
    padding: 24px;
    flex: 1;
    min-width: 0;
}

.booking-right {
    width: 320px;
    padding: 24px 24px 24px 0;
    flex-shrink: 0;
}

/* Menu Items */
.booking-menu__item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.booking-menu__item:hover {
    background: var(--booking-bg);
}

.booking-menu__item.active {
    background: #e8f0f8;
    color: var(--booking-blue);
    font-weight: 500;
    border-left: 3px solid var(--booking-blue);
}

.booking-menu__icon {
    width: 24px;
    font-size: 20px;
    margin-right: 12px;
}

.booking-menu__divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 20px;
}

/* Standard Bootstrap positioning overrides if needed */
.hotel-filters-bar .dropdown-toggle::after {
    display: none;
}

/* Cards */
.hotel-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    transition: var(--transition);
}

.hotel-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--booking-blue);
}

.hotel-card__image {
    width: 280px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .hotel-card {
        flex-direction: column;
    }

    .hotel-card__image {
        width: 100%;
        height: 180px;
    }

    .hotel-card__body {
        padding: 15px;
    }
}

.hotel-card__body {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

.hotel-card__title {
    font-size: 18px;
    font-weight: 500;
    color: var(--booking-blue);
    margin: 0 0 4px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

/* ==========================================================================
   HOTEL FILTERS & GEO REDESIGN (PREMIUM V2)
   ========================================================================== */
.hotel-filters-bar {
    position: sticky;
    top: 60px;
    /* height of .booking-header */
    z-index: 990;
    /* lower than header (1000) */
    background: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    overflow: visible;
    /* CRITICAL for dropdowns */
}

.geo-selection {
    position: relative;
    border-right: 1px solid #f0f0f0;
    padding-right: 15px;
    margin-right: 5px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 220px;
}

.geo-selection__input {
    border: none;
    background: #f1f3f5;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--booking-blue);
    width: 100%;
    padding: 10px 15px 10px 40px;
    height: 40px;
    box-shadow: none;
}

.geo-selection__input:focus {
    background: #e9ecef;
}

.geo-selection__icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--booking-blue);
    z-index: 5;
    opacity: 0.7;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #dde1e5;
    border-radius: 8px;
    padding: 0 15px;
    height: 40px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: #f7fafc;
    border-color: var(--booking-blue);
}

.filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 53, 128, 0.1);
}

.filter-btn.show,
.filter-btn[aria-expanded="true"] {
    background: #f0f7ff;
    border-color: var(--booking-blue);
    color: var(--booking-blue);
}

.filter-btn i {
    opacity: 0.8;
}

.dropdown-menu-filter {
    min-width: 300px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 2000;
}

.filter-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    /* Allow wrapping for buttons too */
}

.btn-filter-apply {
    background: var(--booking-blue);
    color: white;
    font-weight: 600;
    padding: 10px;
    border-radius: 12px;
    border: none;
    transition: all 0.2s;
}

.btn-filter-apply:hover {
    background: #005fa3;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--booking-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--booking-blue-dark);
}

.btn-secondary {
    background: white;
    color: var(--booking-blue);
    border: 1px solid var(--booking-blue);
}

.btn-success {
    background: #008009 !important;
    color: white !important;
}

.btn-success:hover {
    background: #005f07 !important;
    color: white !important;
}

/* Footer Section */
.booking-footer {
    background: var(--booking-blue-dark);
    color: white;
    padding: 40px 0 24px;
    margin-top: 60px;
    width: 100%;
}

.booking-footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.booking-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.booking-footer__section h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 16px 0;
    opacity: 0.9;
}

.booking-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.booking-footer__links li {
    margin-bottom: 8px;
}

.booking-footer__links a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.7;
}

.booking-footer__links a:hover {
    opacity: 1;
}

.booking-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.booking-footer__copyright {
    font-size: 13px;
    opacity: 0.7;
}

.booking-footer__legal {
    display: inline-block;
    margin-left: 16px;
}

.booking-footer__legal a {
    color: white;
    opacity: 0.7;
    text-decoration: none;
    margin-right: 12px;
}

.booking-footer__socials {
    display: flex;
    gap: 16px;
}

.booking-footer__social-link {
    color: white;
    font-size: 20px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 992px) {
    .booking-sidebar {
        display: none;
        /* Hide left sidebar on mobile for now */
    }

    .booking-page-wrapper {
        margin-left: 0;
    }

    .booking-content {
        padding: 16px;
    }

    .booking-footer__grid {
        grid-template-columns: 1fr;
    }

    .booking-header {
        padding: 0 12px;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .booking-header__logo {
        font-size: 16px;
    }

    .ai-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    h1,
    .h1 {
        font-size: 24px !important;
    }

    h2,
    .h2 {
        font-size: 20px !important;
    }

    h3,
    .h3 {
        font-size: 18px !important;
    }
}

/* Travel Pass & Voucher Styles */
.travel-pass {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid #eee;
    margin-bottom: 30px;
}

.pass-header {
    background: linear-gradient(135deg, var(--booking-blue-dark) 0%, #004fb0 100%);
    padding: 32px;
    color: white;
    position: relative;
}

.pass-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 12px;
    background-image: radial-gradient(circle at 6px 12px, transparent 6px, white 6px);
    background-size: 12px 12px;
}

.pass-body {
    padding: 32px;
}

@media (max-width: 768px) {
    .pass-header {
        padding: 20px;
    }

    .pass-body {
        padding: 20px;
    }

    .pass-value {
        font-size: 16px;
    }
}

.pass-section {
    padding: 24px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.pass-section:last-child {
    border-bottom: none;
}

.pass-label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #888;
    font-weight: 700;
    margin-bottom: 8px;
}

.pass-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--booking-blue-dark);
}

.pass-status-badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pass-status-confirmed {
    background: #e6f9f0;
    color: #10b981;
}

.pass-status-pending {
    background: #fff7ed;
    color: #f59e0b;
}

.pass-status-cancelled {
    background: #fef2f2;
    color: #ef4444;
}

.perforated-line {
    border: none;
    border-top: 2px dashed #eee;
    margin: 32px 0;
    position: relative;
}

.perforated-line::before,
.perforated-line::after {
    content: '';
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background: var(--booking-bg);
    border-radius: 50%;
}

.perforated-line::before {
    left: -42px;
}

.perforated-line::after {
    right: -42px;
}

/* Sticky Summary Card */
.sticky-summary {
    position: sticky;
    top: 100px;
}

/* Print Styles */
@media print {

    .booking-header,
    .booking-footer,
    .ai-fab,
    .btn-print-hide,
    .btn-action-hide {
        display: none !important;
    }

    .booking-page-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .travel-pass {
        box-shadow: none !important;
        border: 1px solid #eee !important;
    }

    body {
        background: white !important;
    }
}

/* Marketplace Mobile Fixes */
@media (max-width: 768px) {
    .market-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
        padding: 20px !important;
    }

    .market-header .d-flex {
        width: 100%;
    }

    .market-header input {
        flex: 1;
    }

    .premium-product-card .product-image-container {
        height: 180px;
    }
}

/* Social Feed Mobile Fixes */
@media (max-width: 576px) {
    .stories-scroller {
        padding: 12px;
        margin-bottom: 16px;
    }

    .premium-post-card .post-header {
        padding: 12px 15px;
    }

    .premium-post-card .post-content {
        padding: 0 15px 15px;
    }
}