/* ==========================================================================
   CityHub Listings — v3 (clean B&W "city map" treatment)

   Design source: lostin-citymap-2.html. Inter typeface, 1080px centered column,
   thin-rule category headers, single-line venue rows, column header with the
   "Open in maps" / "LOST iN" labels + info tooltip, "+ Save" / "✓ Saved" pill.

   CSS custom properties (set inline by PHP on wrapper elements):
     --cityhub-accent  — City accent color (still used on map pins + guide header)

   Sections:
     1. Listings wrapper
     2. Category section (header, save-list, toggle switch, body)
     3. Column header (Open in maps / LOST iN + info tooltip)
     4. Venue rows (single line: name · address · neighborhood · icons | maps + save)
     5. Save pill (+ Save / ✓ Saved) + map buttons + divider
     6. Show more (text link)
     7. City map (Leaflet container, filter pills, markers, popups) — unchanged
     8. Mobile breakpoint (<=768px — stacked)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300&display=swap');

.cityhub-listings {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 40px 80px;
    box-sizing: border-box;
    position: relative;
    color: #111111;
    background: transparent;
}

/* ==========================================================================
   Category Section
   ========================================================================== */

.cityhub-category {
    position: relative;
    margin-top: 48px;
}

.cityhub-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 14px;
    border-bottom: 1.5px solid #111111;
    background: transparent;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.cityhub-category__name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #111111;
}

.cityhub-category__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cityhub-category__toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Save list to Google Maps — bordered pill.
   3-class specificity + !important to beat the theme/Elementor button rule. */
.cityhub-listings .cityhub-category__actions .cityhub-btn--save-list {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #111111;
    border: 1px solid #111111 !important;
    padding: 6px 14px !important;
    border-radius: 100px !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.cityhub-listings .cityhub-category__actions .cityhub-btn--save-list:hover {
    background: #111111 !important;
    color: #ffffff !important;
}

/* Toggle switch */
.cityhub-category__toggle-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #999999;
    white-space: nowrap;
}

.cityhub-category__toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.cityhub-toggle__track {
    display: block;
    width: 36px;
    height: 20px;
    background: #e8e8e8;
    border-radius: 100px;
    position: relative;
    transition: background 0.15s ease;
}

.cityhub-category--open .cityhub-toggle__track {
    background: #111111;
}

.cityhub-toggle__thumb {
    display: block;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.15s ease;
}

.cityhub-category--open .cityhub-toggle__thumb {
    transform: translateX(16px);
}

/* Body — hidden by default, shown when open */
.cityhub-category__body {
    display: none;
    background: transparent;
    padding: 0;
}

.cityhub-category--open .cityhub-category__body {
    display: block;
}

/* ==========================================================================
   Column header — "Open in maps" / "LOST iN" + info tooltip
   ========================================================================== */

.cityhub-col-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 0 2px;
}

.cityhub-col-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999999;
    text-align: center;
    white-space: nowrap;
}

.cityhub-col-label--maps {
    width: 120px;
}

.cityhub-col-gap {
    width: 13px;
}

.cityhub-col-label--save {
    width: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Info tooltip */
.cityhub-info-tip {
    position: relative;
    display: inline-flex;
}

.cityhub-info-btn {
    width: 13px !important;
    height: 13px !important;
    min-width: 0 !important;
    border-radius: 50% !important;
    border: 1px solid #999999 !important;
    background: transparent !important;
    color: #999999 !important;
    font-size: 8px !important;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: border-color 0.12s ease, color 0.12s ease;
}

.cityhub-info-tip:hover .cityhub-info-btn,
.cityhub-info-tip.open .cityhub-info-btn {
    border-color: #111111;
    color: #111111;
}

.cityhub-info-pop {
    position: absolute;
    top: 22px;
    right: -8px;
    white-space: nowrap;
    width: auto;
    background: #ffffff;
    border: 1px solid #111111;
    border-radius: 100px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    color: #555555;
    text-align: left;
    z-index: 50;
    display: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cityhub-info-pop strong {
    color: #111111;
    font-weight: 700;
}

.cityhub-info-tip:hover .cityhub-info-pop,
.cityhub-info-tip.open .cityhub-info-pop {
    display: block;
}

/* ==========================================================================
   Venue Row — single line
   ========================================================================== */

.cityhub-venue-list {
    padding: 0;
}

.cityhub-venue-wrapper {
    border-bottom: 1px solid #e0e0de;
}

.cityhub-venue--hidden {
    display: none;
}

.cityhub-venue {
    display: flex;
    align-items: center;
    padding: 11px 0;
}

.cityhub-venue:hover {
    background: rgba(0, 0, 0, 0.015);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.cityhub-venue__content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.cityhub-venue__name {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    cursor: pointer;
}

a.cityhub-venue__name {
    transition: color 0.15s ease;
}

a.cityhub-venue__name:hover {
    color: #555555;
}

.cityhub-venue__address {
    font-size: 11px;
    color: #999999;
    white-space: nowrap;
}

.cityhub-venue__district {
    font-size: 12px;
    color: #999999;
    white-space: nowrap;
}

.cityhub-venue__icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cityhub-venue__icon {
    color: #999999;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.12s ease;
}

.cityhub-venue__icon:hover {
    color: #111111;
}

.cityhub-venue__www {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
}

/* ==========================================================================
   LOST iN AI bon mot — sparkle + popup
   ========================================================================== */

.cityhub-ai-tip {
    position: relative;
    display: inline-flex;
    margin-left: 2px;
}

.cityhub-ai-btn {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: #b8923a;
    transition: color 0.12s ease, transform 0.12s ease;
}

.cityhub-ai-tip:hover .cityhub-ai-btn,
.cityhub-ai-tip.open .cityhub-ai-btn {
    color: #8a6c25;
    transform: scale(1.15);
}

.cityhub-ai-pop {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: max-content;
    max-width: 300px;
    background: #ffffff;
    border: 1px solid #e0e0de;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
    color: #111111;
    text-align: left;
    z-index: 60;
    display: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
}

.cityhub-ai-pop__label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b8923a;
    margin-bottom: 5px;
}

.cityhub-ai-tip:hover .cityhub-ai-pop,
.cityhub-ai-tip.open .cityhub-ai-pop {
    display: block;
}

/* ==========================================================================
   Right side — map buttons, divider, save pill
   ========================================================================== */

/* gap:0 + explicit spacing so the row matches the column-header widths
   exactly: Google + 8 + Apple = 120 (col-maps), divider zone = 13 (col-gap),
   save = 64 (col-save). Flex gap would mis-space the divider. */
.cityhub-venue__buttons {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.cityhub-listings .cityhub-venue__buttons .cityhub-btn--maps,
.cityhub-listings .cityhub-venue__buttons .cityhub-btn--apple {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #111111;
    border: 1px solid #e0e0de !important;
    padding: 4px 0 !important;
    width: 56px;
    text-align: center;
    border-radius: 100px !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.12s ease;
}

.cityhub-listings .cityhub-venue__buttons .cityhub-btn--apple {
    margin-left: 8px;
}

.cityhub-listings .cityhub-venue__buttons .cityhub-btn--maps:hover,
.cityhub-listings .cityhub-venue__buttons .cityhub-btn--apple:hover {
    border-color: #111111 !important;
}

.cityhub-venue-divider {
    width: 1px;
    height: 16px;
    background: #e0e0de;
    flex-shrink: 0;
    margin: 0 6px;
}

/* Save pill — reuses the shared .lh-heart save control, restyled for this surface */
.cityhub-venue .lh-heart.cityhub-save {
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    color: #111111 !important;
    border: 1px solid #111111 !important;
    padding: 4px 0 !important;
    width: 64px !important;
    text-align: center !important;
    border-radius: 100px !important;
    background: transparent !important;
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.4 !important;
    text-transform: none !important;
    transition: background 0.12s ease, color 0.12s ease;
}

.cityhub-venue .lh-heart.cityhub-save:hover,
.cityhub-venue .lh-heart.cityhub-save.is-saved {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
}

/* ==========================================================================
   Show more — text link
   ========================================================================== */

.cityhub-show-more {
    padding: 20px 0 4px;
    text-align: center;
}

.cityhub-listings .cityhub-show-more .cityhub-btn--see-more {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #999999;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.cityhub-listings .cityhub-show-more .cityhub-btn--see-more:hover {
    color: #111111;
}

.cityhub-show-more-count {
    font-size: 11px;
    color: #999999;
    margin-left: 6px;
}

.cityhub-btn {
    cursor: pointer;
    font-family: inherit;
}

/* ==========================================================================
   City Map (unchanged from v2)
   ========================================================================== */

.cityhub-map-wrapper {
    margin: 0 auto 30px;
    max-width: 1400px;
}

.cityhub-map {
    width: 100%;
    border-radius: 12px;
    z-index: 0;
}

.cityhub-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 30px;
}

.cityhub-map-filter {
    background: transparent;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 18px;
    border: 2px solid #ccc;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.cityhub-map-filter:hover {
    border-color: var(--filter-color, var(--cityhub-accent));
    color: var(--filter-color, var(--cityhub-accent));
}

.cityhub-map-filter--active {
    background: var(--filter-color, var(--cityhub-accent));
    border-color: var(--filter-color, var(--cityhub-accent));
    color: #fff;
}

.cityhub-marker {
    background: none !important;
    border: none !important;
}

.cityhub-popup {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.cityhub-popup strong {
    font-size: 14px;
    text-transform: uppercase;
}

.cityhub-popup a {
    color: var(--cityhub-accent, #c9b037);
    text-decoration: none;
}

.cityhub-popup a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Mobile (<=768px) — stacked
   ========================================================================== */

@media (max-width: 768px) {
    .cityhub-listings {
        padding: 0 20px 60px;
    }

    .cityhub-category {
        margin-top: 36px;
    }

    .cityhub-category__header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .cityhub-category__name {
        font-size: 19px;
    }

    .cityhub-category__actions {
        gap: 12px;
        flex-wrap: wrap;
    }

    /* Column header doesn't make sense once rows stack */
    .cityhub-col-header {
        display: none;
    }

    .cityhub-venue {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 0;
    }

    .cityhub-venue:hover {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        background: transparent;
    }

    .cityhub-venue__content {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .cityhub-venue__name {
        white-space: normal;
        flex-basis: 100%;
    }

    .cityhub-venue__buttons {
        justify-content: flex-start;
    }

    .cityhub-venue-divider {
        display: none;
    }

    .cityhub-venue .lh-heart.cityhub-save {
        margin-left: auto;
    }
}
