/**
 * Hlíf Orlofshús Explorer - Airbnb Style Split Layout
 * Nordic Professional Design System
 */

.hlif-airbnb-container {
    width: 100%;
    margin: 24px 0 48px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    position: relative;
}

/* ==========================================================================
   TOP BAR & FILTERS
   ========================================================================== */

.hlif-airbnb-topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

/* Mobile Filter Toggle Trigger */
.hlif-airbnb-mobile-filter-trigger {
    display: none; /* Hidden on desktop */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #c1c7d1;
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0f6096;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hlif-airbnb-mobile-filter-trigger:hover,
.hlif-airbnb-mobile-filter-trigger.is-active {
    border-color: #0f6096;
    background: #f0f7fb;
}

.hlif-filter-trigger-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hlif-filter-chevron {
    transition: transform 0.25s ease;
}

.hlif-airbnb-mobile-filter-trigger.is-active .hlif-filter-chevron {
    transform: rotate(180deg);
}

/* Filter Pills Container / Drawer */
.hlif-airbnb-filter-drawer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hlif-airbnb-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #c1c7d1;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'IBM Plex Sans', sans-serif;
    user-select: none;
}

.hlif-airbnb-pill:hover {
    background: #f0f7fb;
    color: #0f6096;
    border-color: #0f6096;
}

.hlif-airbnb-pill.active {
    background: #0f6096;
    color: #ffffff;
    border-color: #0f6096;
    box-shadow: 0 2px 6px rgba(15, 96, 150, 0.25);
}

.hlif-airbnb-pill-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
}

.hlif-airbnb-pill.active .hlif-airbnb-pill-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.hlif-airbnb-count-badge {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    font-family: 'IBM Plex Sans', sans-serif;
}

/* ==========================================================================
   TWO COLUMN AIRBNB SPLIT LAYOUT (DESKTOP)
   ========================================================================== */

.hlif-airbnb-split {
    display: flex;
    flex-direction: row;
    gap: 28px;
    align-items: flex-start;
    position: relative;
}

/* Left Column: Properties Grid */
.hlif-airbnb-properties-col {
    flex: 1 1 58%;
    min-width: 0;
}

.hlif-airbnb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Property Card */
.hlif-airbnb-card {
    background: #ffffff;
    border: 1px solid #c1c7d1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    cursor: pointer;
}

.hlif-airbnb-card:hover,
.hlif-airbnb-card.is-highlighted {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 96, 150, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
    border-color: #0f6096;
}

/* Card Image & Badges */
.hlif-airbnb-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #e2e8f0;
    overflow: hidden;
}

.hlif-airbnb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.hlif-airbnb-card:hover .hlif-airbnb-img {
    transform: scale(1.03);
}

.hlif-airbnb-badge-loc {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'IBM Plex Sans', sans-serif;
    letter-spacing: 0.2px;
    z-index: 2;
}

.hlif-airbnb-badge-hot-tub {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0f6096;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'IBM Plex Sans', sans-serif;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Card Content */
.hlif-airbnb-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hlif-airbnb-title {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.hlif-airbnb-address {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

/* Feature Spec Tags */
.hlif-airbnb-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.hlif-airbnb-spec-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: #334155;
    font-weight: 500;
}

.hlif-airbnb-spec-item svg {
    color: #0f6096;
    flex-shrink: 0;
}

/* Price & Button Colors (Nordic Professional System) */
.hlif-airbnb-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}

.hlif-airbnb-price {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f6096;
    font-family: 'IBM Plex Sans', sans-serif;
}

.hlif-airbnb-btns {
    display: flex;
    gap: 8px;
}

/* Secondary Button: Outlined Clean */
.hlif-airbnb-btn-view {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #0f6096;
    background: #ffffff;
    border: 1px solid #c1c7d1;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'IBM Plex Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hlif-airbnb-btn-view:hover {
    background: #f0f7fb;
    color: #0b456c;
    border-color: #0f6096;
}

/* Primary Action Button: Solid Primary Blue */
.hlif-airbnb-btn-book {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    background: #0f6096;
    border: 1px solid #0f6096;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'IBM Plex Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 96, 150, 0.2);
}

.hlif-airbnb-btn-book:hover {
    background: #0b456c;
    border-color: #0b456c;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(11, 69, 108, 0.3);
}

/* ==========================================================================
   RIGHT COLUMN: STICKY INTERACTIVE MAP
   ========================================================================== */

.hlif-airbnb-map-col {
    flex: 1 1 42%;
    position: sticky;
    top: 90px;
    height: calc(100vh - 120px);
    min-height: 560px;
    max-height: 820px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #c1c7d1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hlif-airbnb-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Custom Map Pins */
.hlif-map-pin-bubble {
    background: #0f6096;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'IBM Plex Sans', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    border: 2px solid #ffffff;
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hlif-map-pin-bubble:hover,
.hlif-map-pin-bubble.is-active {
    background: #0b456c;
    border-color: #ffffff;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(11, 69, 108, 0.4);
    z-index: 9999 !important;
}

/* Leaflet Popups */
.hlif-airbnb-popup {
    font-family: 'Inter', sans-serif;
    width: 230px;
    padding: 0;
}

.hlif-airbnb-popup-img {
    width: 100%;
    height: 115px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
    display: block;
}

.hlif-airbnb-popup-body {
    padding: 12px;
}

.hlif-airbnb-popup-loc {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #0f6096;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
    font-family: 'IBM Plex Sans', sans-serif;
}

.hlif-airbnb-popup-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #0f172a;
    font-family: 'Hanken Grotesk', sans-serif;
}

.hlif-airbnb-popup-price {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    font-family: 'IBM Plex Sans', sans-serif;
}

.hlif-airbnb-popup-btn {
    display: block;
    text-align: center;
    background: #0f6096;
    color: #ffffff !important;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'IBM Plex Sans', sans-serif;
    transition: background 0.2s ease;
}

.hlif-airbnb-popup-btn:hover {
    background: #0b456c;
}

/* ==========================================================================
   MOBILE FLOATING VIEW TOGGLE (Airbnb Style "Skoða kort / Listi")
   ========================================================================== */

.hlif-airbnb-mobile-view-toggle {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    border-radius: 24px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.hlif-airbnb-mobile-view-toggle:hover {
    background: #0f6096;
    transform: translateX(-50%) scale(1.04);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS & COLLAPSED MOBILE FILTERS
   ========================================================================== */

@media (max-width: 1100px) {
    .hlif-airbnb-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 989px) {
    .hlif-airbnb-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    /* Show mobile filter accordion trigger */
    .hlif-airbnb-mobile-filter-trigger {
        display: flex;
    }

    /* Collapse filters by default on mobile */
    .hlif-airbnb-filter-drawer {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 12px;
        margin-top: 4px;
    }

    .hlif-airbnb-filter-drawer.is-open {
        display: flex;
        animation: hlifSlideDown 0.2s ease-out;
    }

    .hlif-airbnb-pill {
        justify-content: space-between;
        width: 100%;
        padding: 10px 14px;
    }

    .hlif-airbnb-count-badge {
        font-size: 13px;
        text-align: right;
    }

    /* Mobile Split View */
    .hlif-airbnb-split {
        flex-direction: column;
    }

    .hlif-airbnb-properties-col {
        width: 100%;
    }

    .hlif-airbnb-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile Map */
    .hlif-airbnb-map-col {
        width: 100%;
        position: relative;
        top: 0;
        height: 380px;
        min-height: 380px;
        margin-top: 16px;
    }

    /* Show Mobile Floating View Switcher */
    .hlif-airbnb-mobile-view-toggle {
        display: inline-flex;
    }

    /* Mobile Map Only / List Only view classes */
    .hlif-mobile-view-map .hlif-airbnb-properties-col {
        display: none;
    }

    .hlif-mobile-view-map .hlif-airbnb-map-col {
        height: calc(100vh - 200px);
        min-height: 480px;
        margin-top: 0;
    }

    .hlif-mobile-view-list .hlif-airbnb-map-col {
        display: none;
    }
}

@media (max-width: 640px) {
    .hlif-airbnb-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes hlifSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
