/* Frontend Map Styles - Migrated from V2
   Path: assets/css/frontend-map.css
   Version: 5.2.3 - Language switcher with flags
   
   CHANGELOG:
   5.2.3 - Language switcher styles with flag dropdown
   5.2.2 - RTL fixes: search close button, input padding, clear button position
   5.2.1 - CSS variables (--gpp-col-width, --gpp-exp-width), leaflet offset = 0px
   5.0.12 - Replaced CSS teardrop with SVG marker styles
   5.0.11 - Refined marker pin styling
   5.0.10 - Removed hardcoded marker sizes (now set via inline styles from settings)
   5.0.9 - Direct image marker support (no teardrop for uploaded images)
   5.0.8 - All markers use themed teardrop style, added default marker dot
   5.0.7 - Added custom marker icon styles (Dashicons + uploaded images)
   5.0.0 - V2 functionality in V1 shortcode
*/

/* ============================================================
   3-STAGE MAP MODES - CORE DEFINITIONS
   ============================================================ */

/* MODE 1: CONTAINED - Aligns with theme text column */
.gpp-wrapper.gpp-mode-contained,
.gpp-wrapper[data-map-mode="contained"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* MODE 2: BREAKOUT - Wider than text but not edge-to-edge */
/* Uses negative margins to extend beyond parent while staying aligned with text */
.gpp-wrapper.gpp-mode-breakout,
.gpp-wrapper[data-map-mode="breakout"] {
    width: calc(100% + 100px) !important;
    max-width: 1400px !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin-left: -50px !important;
    margin-right: -50px !important;
    border-radius: 6px;
    border: 1px solid #ddd;
    overflow: hidden;
}

/* MODE 3: FULL WIDTH - Edge-to-edge screen breakout */
.gpp-wrapper.gpp-mode-fullwidth,
.gpp-wrapper[data-map-mode="full"] {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    overflow: hidden;
}

/* ============================================================
   DEBUG BOX (Draggable & Minimizable)
   ============================================================ */
.gpp-debug-box {
    position: fixed;
    top: 100px; left: 20px;
    width: 260px;
    z-index: 99999999;
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    font-family: monospace; font-size: 12px;
    border: 1px solid #00ff00;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
}
.gpp-debug-header {
    background: #004400;
    color: #fff;
    padding: 5px 10px;
    cursor: grab;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold; border-bottom: 1px solid #00ff00;
}
.gpp-debug-header:active { cursor: grabbing; }
.gpp-debug-controls span {
    cursor: pointer; padding: 0 5px; font-size: 14px;
}
.gpp-debug-content {
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}
.gpp-debug-minimized .gpp-debug-content { display: none; }
.gpp-debug-minimized { width: 150px; height: auto; }

/* ============================================================
   DUAL SEARCH COMPONENT
   ============================================================ */
.gpp-dual-search-wrapper {
    background: transparent; border: none;
    font-family: -apple-system, sans-serif;
    min-width: 280px; max-width: 320px;
    margin: 10px; z-index: 2000;
    transition: all 0.2s ease;
}

/* Responsive width adjustments */
@media screen and (max-width: 768px) {
    .gpp-dual-search-wrapper:not(.gpp-search-collapsed) {
        max-width: calc(100vw - 180px) !important; /* Sidebar (60px) + right controls (60px) + margins (60px) */
        min-width: 200px !important;
    }
}

@media screen and (max-width: 480px) {
    .gpp-dual-search-wrapper:not(.gpp-search-collapsed) {
        max-width: calc(100vw - 140px) !important;
        min-width: 180px !important;
    }
}

@media screen and (max-width: 360px) {
    .gpp-dual-search-wrapper:not(.gpp-search-collapsed) {
        max-width: calc(100vw - 120px) !important;
        min-width: 160px !important;
    }
}

/* Mobile Collapsed State (Leaflet-style button) */
.gpp-dual-search-wrapper.gpp-search-collapsed {
    min-width: 34px !important;
    width: 43px !important;
    height: 43px !important;
    background: #fff;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    background-clip: padding-box;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
    margin-left: 10px; margin-top: 10px;
}

.gpp-dual-search-wrapper.gpp-search-collapsed:hover {
    background: #f4f4f4;
}

.gpp-search-toggle-icon {
    position: absolute; top: 0; left: 0; 
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; z-index: 2001;
    color: #000;
}
.gpp-search-toggle-icon .dashicons { font-size: 25px; width: 25px; height: 25px; }

.gpp-dual-search-wrapper.gpp-search-collapsed .gpp-search-toggle-icon { opacity: 1; }
.gpp-dual-search-wrapper.gpp-search-collapsed .gpp-dual-search-header,
.gpp-dual-search-wrapper.gpp-search-collapsed .gpp-dual-search-container { opacity: 0; pointer-events: none; }

/* Header */
.gpp-dual-search-header {
    border-radius: 4px 4px 0 0;
    padding: 10px;
    display: flex; flex-direction: column; gap: 8px;
    position: relative;
}
.gpp-mobile-search-close {
    position: absolute; top: 5px; right: 5px;
    background: none; border: none;
    color: inherit; opacity: 0.8;
    font-size: 20px; cursor: pointer; line-height: 1;
}
.gpp-dual-search-title { font-weight: 700; font-size: 13px; text-transform: uppercase; }

/* Tabs */
.gpp-dual-search-toggle {
    display: flex; background: rgba(0,0,0,0.1); border-radius: 4px; padding: 2px;
}
.gpp-toggle-btn {
    flex: 1; text-align: center; font-size: 12px; padding: 4px 0;
    cursor: pointer; border-radius: 3px; color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}
.gpp-toggle-btn.active {
    color: #333; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Container & Results */
.gpp-dual-search-container {
    background: white; border-radius: 0 0 4px 4px; padding: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}
.gpp-search-input-wrap { display: none; position: relative; }
.gpp-search-input-wrap.active { display: block; }

.gpp-search-input {
    width: 100%; box-sizing: border-box;
    padding: 6px 25px 6px 8px;
    border: 1px solid #ccc; border-radius: 3px;
    font-size: 13px; outline: none;
}
.gpp-input-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #999; display: none; font-weight: bold; }

/* v5.2.2: RTL fixes for search component */
.gpp-wrapper.gpp-rtl .gpp-mobile-search-close {
    right: auto; left: 5px;
}
.gpp-wrapper.gpp-rtl .gpp-dual-search-title {
    text-align: right;
}
.gpp-wrapper.gpp-rtl .gpp-search-input {
    padding: 6px 8px 6px 25px;
    text-align: right;
}
.gpp-wrapper.gpp-rtl .gpp-input-clear {
    right: auto; left: 8px;
}
.gpp-wrapper.gpp-rtl .gpp-search-results li {
    text-align: right;
}

.gpp-search-results {
    list-style: none; margin: 5px 0 0 0; padding: 0;
    max-height: 180px; overflow-y: auto; border-top: 1px solid #eee;
    display: none;
}
.gpp-search-results li { padding: 6px 8px; border-bottom: 1px solid #f9f9f9; font-size: 12px; cursor: pointer; color: #444; }
.gpp-search-results li:hover { background: #f4f4f4; }
.gpp-search-results li strong { display: block; color: #000; }

/* ============================================================
   GLOBAL / BASE STYLES
   ============================================================ */
body { overflow-x: hidden; }

.gpp-wrapper { 
    position: relative; 
    overflow: hidden; 
    background: #f0f0f0; 
    z-index: 1;
    transition: all 0.3s ease;
    /* v5.2.1: CSS variables for sidebar widths (JS sets these immediately) */
    --gpp-col-width: 60px;
    --gpp-exp-width: 250px;
}

.gpp-map-layer { width: 100%; height: 100%; z-index: 0; }

.gpp-sidebar { 
    position: absolute; top: 0; bottom: 0; width: var(--gpp-col-width, 60px); z-index: 1000; 
    display: flex; flex-direction: column; align-items: center; 
    padding-top: 15px; pointer-events: none; background: transparent; 
}
.gpp-wrapper:not(.gpp-rtl) .gpp-sidebar { left: 0; right: auto; }
.gpp-wrapper.gpp-rtl .gpp-sidebar { right: 0; left: auto; }
/* v5.2.1: Leaflet controls at 0px offset */
.gpp-wrapper:not(.gpp-rtl) .leaflet-left { left: 0 !important; }
.gpp-wrapper.gpp-rtl .leaflet-right { right: 0 !important; }

/* ============================================================
   MENU ITEMS / ICONS / POPUPS
   ============================================================ */
.gpp-menu-item { 
    pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; 
    margin-bottom: 12px; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.3); transition: transform 0.2s; 
    border: 1px solid rgba(255,255,255,0.2); background: #fff; 
}
.gpp-menu-item:hover { transform: scale(1.1); }
.gpp-menu-item img { width: 24px; height: 24px; object-fit: contain; }
.gpp-menu-item .dashicons { font-size: 20px; width: 20px; height: 20px; color: inherit; }

.gpp-submenu-bubble { 
    position: absolute; width: 220px; background: white; border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 1001; overflow: hidden; display: none; 
}
.gpp-bubble-header { padding: 10px 15px; font-weight: bold; font-size: 14px; }
.gpp-bubble-content { padding: 10px 0; max-height: 250px; overflow-y: auto; }

.gpp-sub-row { 
    display: flex; align-items: center; padding: 8px 15px; 
    font-size: 13px; cursor: pointer; color: #333; transition: background 0.1s; 
}
.gpp-sub-row:hover { background: #f9f9f9; }
.gpp-sub-row span { flex: 1; }

.gpp-wrapper.gpp-rtl .gpp-sub-row { flex-direction: row-reverse; text-align: right; }
.gpp-wrapper.gpp-rtl .gpp-sub-row input { margin-right: 0; margin-left: 10px; }
.gpp-wrapper:not(.gpp-rtl) .gpp-sub-row input { margin-right: 10px; margin-left: 0; }

.gpp-empty-subs { font-size: 12px; color: #999; text-align: center; padding: 15px; }

.gpp-popup { font-family: sans-serif; min-width: 200px; }
.gpp-wrapper.gpp-rtl .gpp-popup { direction: rtl; text-align: right; }
.gpp-popup h3 { margin: 5px 0 8px 0; font-size: 15px; font-weight: 600; color: #000 !important; }
.gpp-popup img, .gpp-popup video, .gpp-popup iframe { 
    width: 100%; border-radius: 4px; margin-bottom: 8px; display: block; 
}
.gpp-popup iframe { height: 150px; border:none; }

.gpp-store-row { 
    font-size: 13px; margin-bottom: 4px; 
    display: flex; align-items: center; gap: 5px; 
}
.gpp-wrapper.gpp-rtl .gpp-store-row { flex-direction: row-reverse; }

/* ============================================================
   RTL SIDEBAR TOGGLE FIX
   ============================================================ */
.gpp-wrapper.gpp-rtl.gpp-sidebar-expanded .gpp-sidebar .gpp-sidebar-toggle {
    align-self: flex-start !important;
    margin-left: 15px !important;
    margin-right: auto;
}

/* ============================================================
   SUBCATEGORY CONTAINER
   ============================================================ */
.gpp-sub-container {
    border-top: none !important;
}

/* ============================================================
   SIDEBAR TOGGLE BUTTON
   ============================================================ */
.gpp-sidebar-toggle {
    pointer-events: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #333;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.gpp-sidebar-toggle:hover {
    background: #f0f0f0;
}

.gpp-sidebar-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

/* ============================================================
   CATEGORY GROUPS & LABELS
   ============================================================ */
.gpp-cat-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
    pointer-events: auto;
}

.gpp-cat-label {
    display: none;
    opacity: 0;
    margin-left: 12px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    transition: opacity 0.2s;
    text-align: left;
}

.gpp-rtl .gpp-cat-label {
    margin-left: 0;
    margin-right: 12px;
    text-align: right;
}

.gpp-sidebar-expanded .gpp-cat-label {
    display: block;
    opacity: 1;
}

.gpp-sidebar-expanded .gpp-menu-item {
    width: 90%;
    height: auto;
    border-radius: 4px;
    padding: 10px;
    margin: 0 auto;
    transform: none !important;
    justify-content: flex-start;
}

.gpp-sidebar-expanded .gpp-menu-item:hover {
    background: rgba(255,255,255,0.9);
}

/* ============================================================
   INLINE SUBCATEGORIES
   ============================================================ */
.gpp-sub-row-inline {
    display: flex;
    align-items: center;
    padding: 6px 10px 6px 20px;
    font-size: 12px;
    cursor: pointer;
}

.gpp-rtl .gpp-sub-row-inline {
    padding: 6px 20px 6px 10px;
    flex-direction: row-reverse;
}

.gpp-sub-row-inline:hover {
    background: rgba(255,255,255,0.05);
}

.gpp-sub-row-inline input {
    margin-right: 8px;
    cursor: pointer;
}

.gpp-rtl .gpp-sub-row-inline input {
    margin-right: 0;
    margin-left: 8px;
}

/* ============================================================
   MAP JUMPER
   ============================================================ */
.gpp-map-jumper-container {
    display: flex;
    margin-bottom: 10px;
    padding: 0 5px;
}

.gpp-map-jumper-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 180px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.gpp-map-jumper-select:hover {
    opacity: 0.9;
}

.gpp-map-jumper-select:focus {
    outline: none;
}

.gpp-map-jumper-select option {
    background: #fff;
    color: #333;
}

@media screen and (max-width: 768px) {
    .gpp-map-jumper-container {
        justify-content: center;
    }
    
    .gpp-map-jumper-select {
        font-size: 13px;
        min-width: 150px;
        width: 100%;
        max-width: 300px;
    }
}

/* ============================================================
   LANGUAGE SWITCHER (v5.2.2)
   ============================================================ */
.gpp-lang-switcher {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

.gpp-lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #6a5acd;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.gpp-lang-current:hover {
    opacity: 0.9;
}

.gpp-lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.gpp-lang-code {
    font-weight: 600;

    text-transform: uppercase;
}

.gpp-lang-arrow {
    font-size: 10px;
    margin-left: 2px;
}

.gpp-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 160px;
    z-index: 10001;
    display: none;
    overflow: hidden;
}

.gpp-lang-switcher.open .gpp-lang-dropdown {
    display: block;
}

.gpp-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease;
}

.gpp-lang-option:hover {
    background: #f5f5f5;
}

.gpp-lang-option.active {
    background: #e8f4fd;
}

.gpp-lang-option .gpp-lang-flag {
    width: 24px;
    height: 18px;
}

.gpp-lang-name {
    flex: 1;
    font-size: 13px;
}

.gpp-lang-check {
    color: #4CAF50;
    font-weight: bold;
}

/* RTL Language Switcher */
.gpp-wrapper.gpp-rtl .gpp-lang-switcher {
    margin-left: 0;
    margin-right: 10px;
}

.gpp-wrapper.gpp-rtl .gpp-lang-dropdown {
    right: auto;
    left: 0;
}

.gpp-wrapper.gpp-rtl .gpp-lang-option {
    flex-direction: row-reverse;
}

@media screen and (max-width: 768px) {
    .gpp-lang-switcher {
        margin-left: 8px;
    }
    
    .gpp-lang-current {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .gpp-lang-flag {
        width: 18px;
        height: 13px;
    }
    
    .gpp-lang-dropdown {
        min-width: 140px;
    }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.gpp-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    gap: 15px;
}

.gpp-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gpp-spin 1s linear infinite;
}

@keyframes gpp-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   STORE INFO DISPLAY
   ============================================================ */
.gpp-store-info {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.gpp-store-row .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #777;
}

.gpp-store-row a {
    text-decoration: none;
}

/* ============================================================
   MINIMAL STORE MODE
   ============================================================ */
.gpp-minimal-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.gpp-min-item {
    width: 32px;
    height: 32px;
    background: #f4f4f4;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s;
}

.gpp-min-item:hover {
    color: #fff;
}

/* ============================================================
   GALLERY STACK
   ============================================================ */
.gpp-gallery-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

.gpp-gallery-stack::-webkit-scrollbar {
    width: 4px;
}

.gpp-gallery-stack::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.gpp-thumb-item {
    width: 100%;
    height: 140px;
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    background: #333;
    border: 1px solid #ddd;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpp-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #333;
}

.gpp-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
}

/* VIDEO GRADIENT PLACEHOLDER */
.gpp-thumb-placeholder.gpp-video-placeholder {
    background: var(--search-bg-color, #6a5acd) !important;
    /* Fallback to search button color if available, otherwise use purple */
}

/* AUDIO GRADIENT PLACEHOLDER */
.gpp-thumb-placeholder.gpp-audio-placeholder {
    background: linear-gradient(135deg, #3cb371 0%, #20b2aa 100%) !important;
}

/* Smaller icons for gradient placeholders */
.gpp-thumb-placeholder .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #ffffff !important;
}

.gpp-thumb-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 32px;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    pointer-events: none;
    opacity: 0.9;
    z-index: 2;
}

/* ============================================================
   VIDEO FACADE (YouTube Preview)
   ============================================================ */
.gpp-video-facade {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpp-video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gpp-video-facade:hover img {
    opacity: 0.6;
}

.gpp-play-btn {
    position: absolute;
    width: 60px;
    height: 40px;
    background: #ff0000;
    border-radius: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.gpp-play-btn::after {
    content: "";
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent white;
    margin-left: 2px;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#gpp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

#gpp-lightbox-content {
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#gpp-lightbox-content img,
#gpp-lightbox-content video,
#gpp-lightbox-content iframe,
#gpp-lightbox-content .gpp-video-facade {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#gpp-lightbox-content iframe,
#gpp-lightbox-content .gpp-video-facade {
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 450px;
    background: #000;
}

#gpp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 100000;
}

.gpp-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 100000;
    padding: 20px;
    user-select: none;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

#gpp-lb-prev {
    left: 10px;
}

#gpp-lb-next {
    right: 10px;
}

/* ============================================================
   ACCORDION MODE
   ============================================================ */
.gpp-acc-head {
    padding: 8px 12px;
    background: #f8f9fa;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
}

.gpp-acc-head:hover {
    background: #e9ecef;
}

.gpp-acc-body {
    padding: 10px;
    display: none;
}

/* ============================================================
   INFO ICON MODE
   ============================================================ */
.gpp-info-wrapper {
    position: relative;
    margin: 10px 0;
}

.gpp-info-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.gpp-info-toggle:hover {
    transform: scale(1.1);
}

.gpp-info-body {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}





/* ============================================================
   VERSION 5.0.6 FIX: Magnifying Glass Ghost Bug
   Add this to: assets/css/frontend-map.css
   ============================================================ */

/* Fix: Hide magnifying glass icon when search panel is expanded */
.gpp-dual-search-wrapper .gpp-search-toggle-icon {
    display: flex;
    pointer-events: none;
    z-index: 1;
}

.gpp-dual-search-wrapper:not(.gpp-search-collapsed) .gpp-search-toggle-icon {
    display: none !important;
}

/* Ensure the search header and content are above the icon */
.gpp-dual-search-header,
.gpp-dual-search-container {
    position: relative;
    z-index: 2;
}

/* ============================================================
   VERSION 5.0.7: CUSTOM MARKER ICONS
   Supports Dashicons and uploaded images
   ============================================================ */

/* Base custom marker container */
.gpp-custom-marker {
    background: transparent !important;
    border: none !important;
}

/* =====================================================================
   SVG-BASED MARKER STYLES (v5.0.11)
   Uses inline SVG for perfect scaling at any zoom level
   ===================================================================== */

/* Base marker container */
.gpp-custom-marker {
    background: none !important;
    border: none !important;
}

/* Adaptive marker scaling (v5.4.0) - shrinks markers at low zoom with many points.
   Targets child elements (SVG/img), NOT the .gpp-custom-marker div itself,
   because Leaflet manages transform: translate3d() on the marker container. */
.gpp-custom-marker > * {
    transform: scale(var(--gpp-marker-scale, 1));
    transform-origin: center bottom;
    transition: transform 0.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .gpp-custom-marker > * {
        transition: none;
    }
}

.gpp-svg-marker {
    position: relative;
    display: block;
}

.gpp-svg-marker svg {
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Dashicon positioned over SVG pin */
.gpp-svg-marker .gpp-marker-icon {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

/* Direct image marker (uploaded images/SVGs) */
.gpp-image-marker-direct {
    background: none !important;
}

.gpp-image-marker-direct .gpp-marker-image {
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Hover effect */
.gpp-custom-marker:hover .gpp-svg-marker svg {
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
}

.gpp-custom-marker:hover .gpp-marker-image {
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
}

/* Image inside the pin */
.gpp-marker-pin-image {
    padding: 3px;
    overflow: hidden;
}

.gpp-marker-pin-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transform: rotate(45deg);
}

/* Shadow under the marker */
.gpp-marker-shadow {
    width: 14px;
    height: 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(2px);
}

/* Hover effect */
.gpp-custom-marker:hover .gpp-marker-pin {
    transform: rotate(-45deg) scale(1.1);
    transition: transform 0.2s ease;
}

/* SVG icon support (for uploaded SVGs) */
.gpp-marker-pin img[src$=".svg"] {
    filter: brightness(0) invert(1); /* Make SVG white */
}

/* Larger custom markers option */
.gpp-custom-marker.gpp-marker-lg .gpp-marker-pin {
    width: 40px;
    height: 40px;
}

.gpp-custom-marker.gpp-marker-lg .gpp-marker-pin .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ============================================================
   RESPONSIVE / MOBILE
   ============================================================ */
@media screen and (max-width: 768px) {
    /* Breakout mode becomes contained on mobile */
    .gpp-wrapper.gpp-mode-breakout,
    .gpp-wrapper[data-map-mode="breakout"] {
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        transform: none !important;
        border-radius: 0;
    }
    
    /* v5.2.1: Leaflet controls at 0px offset on mobile */
    .gpp-wrapper:not(.gpp-rtl) .leaflet-left {
        left: 0 !important;
    }
    
    .gpp-wrapper.gpp-rtl .leaflet-right {
        right: 0 !important;
    }
}