/*
 * RT Location Menu Map Styles
 * Version: 3.7
 */

/* ===== Menu (Stellarnav) =====
   Fonts and colors come from the theme. Only layout and spacing are set here. */

/* Hidden from the first paint, so the list does not flash in the menu while the page loads.
   Stellarnav opens and closes it after that. */
.menu-item.rt-location-menu-item .rt-loc-menu,
.menu-item.rt-location-menu-item .rt-loc-menu ul {
    display: none;
}

/* Stellarnav provides the hamburger: hide the theme's own button (only once Stellarnav is running) */
body.rt-stellar-active .mobile-menu-toggle { display: none !important; }

/* Hamburger mode: keep the nav visible so the hamburger button shows, on the right */
.stellarnav.mobile { display: block !important; text-align: right; }

/* Sub-menu links: regular, compact spacing (no big gaps) */
.stellarnav.stellarnav ul ul li > a:not(.dd-toggle) {
    display: block;
    float: none;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 6px 14px;
    line-height: 1.4;
    text-align: left;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Desktop: scrolling country list, cities panel opens to the left of it */
.stellarnav.desktop .rt-loc-menu {
    max-height: 70vh;
    overflow-y: auto;
}

.stellarnav.desktop .rt-loc-menu ul {
    position: fixed;      /* position is set by script.js; fixed so the list's scroll does not clip it */
    top: 0;
    bottom: 0;
    left: auto;
    width: 220px;
    overflow-y: auto;
}

/* No visible scrollbar */
.stellarnav.desktop .rt-loc-menu,
.stellarnav.desktop .rt-loc-menu ul {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stellarnav.desktop .rt-loc-menu::-webkit-scrollbar,
.stellarnav.desktop .rt-loc-menu ul::-webkit-scrollbar {
    display: none;
}

/* Hamburger mode: everything opens inline, one column, indented */
.stellarnav.mobile ul ul li > a:not(.dd-toggle) { padding-left: 24px; }
.stellarnav.mobile ul ul ul li > a:not(.dd-toggle) { padding-left: 36px; }

/* Expand button matches the compact row height */
.stellarnav.mobile ul ul li > a.dd-toggle {
    width: 44px;
    height: auto;
    padding: 6px 0;
    line-height: 1.4;
}

.stellarnav.mobile ul ul li > a.dd-toggle .icon-plus {
    height: 1.4em;
}

/* Map Container Styles */
.rt-location-map-container {
    position: relative;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.rt-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #666;
    z-index: 1;
}

#rt-interactive-map {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Map Marker Popups */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 14px 16px !important;
    line-height: 1.4 !important;
    min-width: 420px;
}

/* Standalone Shortcode Card [location_sponsors] (Identical to Map Popup) */
.rt-standalone-sponsors-card {
    background: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e2e8f0;
    padding: 14px 16px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 432px !important;
    max-width: 100% !important;
    margin: 15px 0 !important;
    font-family: inherit;
}

.rt-map-popup-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: inherit;
}

.rt-popup-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    margin: 0;
}

/* Sponsor Ad Banner Cards (Responsive: Desktop 400x133, Tablet 300x100, Mobile 143x42) */
.rt-sponsor-container {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

.rt-sponsor-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px 0;
}

.rt-sponsor-slider {
    display: flex;
    gap: 8px;
    width: 400px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rt-sponsor-slider::-webkit-scrollbar {
    display: none;
}

.rt-sponsor-card {
    flex: 0 0 400px;
    width: 400px;
    height: 133px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    scroll-snap-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rt-sponsor-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.rt-sponsor-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Tablet (768px - 1023px): 300x100 */
@media (max-width: 1023px) and (min-width: 768px) {
    .leaflet-popup-content {
        min-width: 320px !important;
    }
    .rt-standalone-sponsors-card {
        width: 332px !important;
    }
    .rt-sponsor-slider {
        width: 300px;
    }
    .rt-sponsor-card {
        flex: 0 0 300px;
        width: 300px;
        height: 100px;
    }
}

/* Mobile (<768px): 143x42 */
@media (max-width: 767px) {
    .leaflet-popup-content {
        min-width: 195px !important;
    }
    .rt-standalone-sponsors-card {
        width: 175px !important;
        padding: 10px 12px !important;
    }
    .rt-sponsor-slider {
        width: 143px;
    }
    .rt-sponsor-card {
        flex: 0 0 143px;
        width: 143px;
        height: 42px;
    }
}

.rt-slider-arrow {
    width: 20px;
    height: 36px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.rt-slider-arrow:hover {
    background: #0073aa;
    border-color: #0073aa;
    color: #ffffff;
}

/* Standalone Peek Carousel Layout */
.rt-standalone-sponsors {
    width: 100%;
    margin: 16px auto;
    overflow: hidden;
    position: relative;
}

.rt-peek-slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.rt-peek-stage {
    position: relative;
    width: 100%;
    height: 155px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rt-peek-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 133px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.45s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.rt-peek-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
}

/* Card states */
.rt-peek-card.rt-pos-center {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
}

.rt-peek-card.rt-pos-left {
    transform: translate(calc(-50% - 370px), -50%) scale(0.72);
    opacity: 0.65;
    z-index: 2;
    pointer-events: auto;
}

.rt-peek-card.rt-pos-right {
    transform: translate(calc(-50% + 370px), -50%) scale(0.72);
    opacity: 0.65;
    z-index: 2;
    pointer-events: auto;
}

.rt-peek-card.rt-pos-hidden {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

/* Bullets matching screenshot */
.rt-sponsor-bullets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 4px 0;
    padding: 0;
}

.rt-sponsor-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
}

.rt-sponsor-bullet.is-active {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1e3a2b;
    border: 2px solid #1e3a2b;
    padding: 2px;
    background-clip: content-box;
    box-shadow: 0 0 0 2px #ffffff;
}

/* Tablet: 300x100 */
@media (max-width: 1023px) and (min-width: 768px) {
    .rt-peek-stage {
        height: 120px;
    }
    .rt-peek-card {
        width: 300px;
        height: 100px;
    }
    .rt-peek-card.rt-pos-left {
        transform: translate(calc(-50% - 270px), -50%) scale(0.72);
    }
    .rt-peek-card.rt-pos-right {
        transform: translate(calc(-50% + 270px), -50%) scale(0.72);
    }
}

/* Mobile: 240x80 */
@media (max-width: 767px) {
    .rt-peek-stage {
        height: 100px;
    }
    .rt-peek-card {
        width: 240px;
        height: 80px;
    }
    .rt-peek-card.rt-pos-left {
        transform: translate(calc(-50% - 200px), -50%) scale(0.7);
    }
    .rt-peek-card.rt-pos-right {
        transform: translate(calc(-50% + 200px), -50%) scale(0.7);
    }
}

.rt-popup-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}

/* CPT button links */
.rt-cpt-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;
    color: #ffffff !important;
    background: #0073aa;
    border: 1px solid #006292;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.rt-cpt-btn:hover {
    background: #005177;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.rt-cpt-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Sponsored CPT button highlight */
.rt-cpt-btn.rt-cpt-sponsored {
    background: #fffbeb;
    color: #b45309 !important;
    border: 1px solid #f59e0b;
}

.rt-cpt-btn.rt-cpt-sponsored:hover {
    background: #fef3c7;
    color: #92400e !important;
    border-color: #d97706;
}

.rt-popup-empty {
    font-size: 13px;
    font-style: italic;
    color: #64748b;
    padding: 2px 0;
}

/* hide theme hamburger and restyle a little to blend*/

.site-header .header-content {
    position: relative !important;
}

body.rt-stellar-active header.site-header button.menu-toggle.menu-toggle {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

.main-navigation.stellarnav.mobile {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 9999 !important;
    margin: 0 !important;
}

.main-navigation.stellarnav.mobile {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0 !important;
}

/* Floating Location Search on Map */
.rt-map-search-control {
    position: relative;
    margin: 12px 12px 0 0;
    z-index: 1000;
    font-family: inherit;
}

.rt-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #cbd5e1;
    overflow: hidden;
    width: 260px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.rt-search-input-wrap:focus-within {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.25);
}

.rt-search-icon {
    padding: 0 8px 0 10px;
    font-size: 13px;
    color: #64748b;
    user-select: none;
}

.rt-map-search-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    padding: 9px 4px 9px 0 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    color: #1e293b !important;
    background: transparent !important;
    box-shadow: none !important;
}

.rt-search-clear {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
}

.rt-search-clear:hover {
    color: #334155;
}

.rt-search-results {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1001;
}

.rt-search-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.rt-search-item:last-child {
    border-bottom: none;
}

.rt-search-item:hover {
    background: #f0f7ff;
    color: #0073aa;
}

.rt-search-global {
    background: #faf5ff;
    color: #6b21a8;
}

.rt-search-global:hover {
    background: #f3e8ff;
    color: #581c87;
}

.rt-search-loading,
.rt-search-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    text-align: center;
}

/* Locate Me GPS Button */
.rt-locate-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    background: #ffffff !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px !important;
    cursor: pointer;
    margin-top: 8px !important;
    padding: 0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.rt-locate-btn:hover {
    background: #f8fafc !important;
    border-color: #0073aa !important;
}

.rt-locate-icon {
    font-size: 20px;
    line-height: 1;
    color: #334155;
    transition: color 0.15s ease;
}

.rt-locate-btn:hover .rt-locate-icon {
    color: #0073aa;
}

.rt-locate-btn.rt-locating {
    animation: rt-pulse 0.8s infinite alternate;
    border-color: #0073aa !important;
}

.rt-locate-btn.rt-locating .rt-locate-icon {
    color: #0073aa;
}

@keyframes rt-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

