/* assets/css/frontend-map.css - v1.3.0 */
/* Frontend map: 2-state sidepanel + gallery support + SVG arrow icons */
/* v1.3.0: Topbar search outside map + Mobile slim menu only, no backgrounds, colored text/icons */

/* ========================================
   MAP CONTAINER
======================================== */
.gpp-frontend-map-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.gpp-frontend-map {
    height: 600px;
    width: 100%;
    border: none;
    box-sizing: border-box;
}

/* Full-width breakout from content container */
.entry-content .gpp-frontend-map-wrapper,
.wp-block-post-content .gpp-frontend-map-wrapper {
    max-width: 100vw !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

@media (max-width: 768px) {
    .gpp-frontend-map {
        height: 500px;
    }
}

@media (max-width: 480px) {
    .gpp-frontend-map {
        height: 400px;
    }
}

.gpp-no-map {
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    text-align: center;
}

/* ========================================
   TOPBAR SEARCH (OPTION A)
======================================== */
.gpp-map-topbar {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    margin: 15px auto 10px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.gpp-map-topbar.gpp-rtl {
    direction: rtl;
    justify-content: flex-end;
}

/* Searchbox wrapper */
.gpp-topbar-search {
    flex: 0 0 auto;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    padding: 0;
    display: flex;
    align-items: center;
}

/* Search input field */
.gpp-topbar-search input {
    width: 250px;
    padding: 8px 12px;
    border: none;
    outline: none;
    font-size: 14px;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.gpp-map-topbar.gpp-rtl .gpp-topbar-search input {
    text-align: right;
}

.gpp-topbar-search input::placeholder {
    color: #999;
}

.gpp-topbar-search input:focus {
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Mobile adjustments for topbar */
@media (max-width: 768px) {
    .gpp-map-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0 12px;
    }

    .gpp-map-topbar.gpp-rtl {
        align-items: flex-end;
    }

    .gpp-topbar-search input {
        width: 200px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .gpp-topbar-search input {
        width: 150px;
        font-size: 13px;
    }
}

/* ========================================
   SIDEPANEL BASE STYLES
======================================== */
.gpp-sidepanel {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    padding: 10px;
    transition: width 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.gpp-sidepanel-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.35);
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: background 0.2s, transform 0.2s;
    z-index: 1001;
}

.gpp-sidepanel-toggle:hover {
    background: #f0f0f0 !important;
    transform: scale(1.05);
}

.gpp-sidepanel-toggle-icon {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) saturate(100%);
    transition: filter 0.2s;
}

.gpp-sidepanel-toggle:hover .gpp-sidepanel-toggle-icon {
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1573%) hue-rotate(201deg) brightness(97%) contrast(97%);
}

.gpp-sidepanel-inner {
    margin-top: 50px;
}

/* ========================================
   CATEGORY STYLES - DESKTOP
======================================== */
.gpp-category {
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.2s;
    background: transparent !important;
}

.gpp-category:hover {
    opacity: 0.95;
}

.gpp-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    /* Background color applied inline from PHP */
}

.gpp-category-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.gpp-category-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    /* Color applied inline from PHP */
}

.gpp-category-subcategories {
    margin-left: 0;
    margin-top: 8px;
    display: block;
    padding: 6px 4px;
    border-radius: 4px;
}

.gpp-subcategory-item {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    cursor: pointer;
    line-height: 1.4;
}

.gpp-subcategory-item input {
    margin-right: 6px;
    cursor: pointer;
}

.gpp-subcategory-name {
    vertical-align: middle;
    /* Color applied inline from PHP */
}

/* ========================================
   COLLAPSED STATE (60px - icons only)
======================================== */
.gpp-sidepanel.gpp-state-collapsed {
    width: 60px;
    padding: 10px 5px;
}

.gpp-sidepanel.gpp-state-collapsed .gpp-category {
    padding: 8px 4px;
    text-align: center;
}

.gpp-sidepanel.gpp-state-collapsed .gpp-category-header {
    flex-direction: column;
    gap: 4px;
    background: transparent !important;
}

.gpp-sidepanel.gpp-state-collapsed .gpp-category-name {
    display: none;
}

.gpp-sidepanel.gpp-state-collapsed .gpp-category-subcategories {
    display: none !important;
}

/* ========================================
   FLOATING SUBMENU
======================================== */
.gpp-floating-submenu {
    position: absolute;
    left: 65px;
    min-width: 200px;
    max-width: 300px;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1002;
    display: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s, transform 0.2s;
}

.gpp-floating-submenu * {
    color: inherit !important;
}

.gpp-floating-submenu.gpp-show {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.gpp-floating-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.gpp-floating-submenu .gpp-subcategory-item {
    margin-bottom: 8px;
    padding: 4px 0;
}

/* ========================================
   POPUP STYLING
======================================== */
.gpp-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.gpp-popup-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.gpp-popup-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* ========================================
   POPUP GALLERY - CAROUSEL WITH ARROWS
======================================== */
.gpp-popup-gallery-carousel {
    position: relative;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gpp-gallery-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}

.gpp-gallery-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.gpp-gallery-scroll-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.gpp-gallery-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

.gpp-gallery-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.5);
}

.gpp-gallery-track {
    display: flex;
    gap: 10px;
    padding: 5px 0;
}

.gpp-gallery-item {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gpp-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1;
}

.gpp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gpp-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 8px 6px 4px;
    font-size: 11px;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.gpp-gallery-item:hover .gpp-gallery-caption {
    opacity: 1;
}

.gpp-gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: all 0.3s;
}

.gpp-gallery-item:hover .gpp-gallery-play-icon {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Video item - subtle indicator */
.gpp-video-item {
    border: 2px solid rgba(0, 0, 0, 0.15);
}

.gpp-video-item:hover {
    border-color: rgba(0, 0, 0, 0.3);
}

/* ========================================
   GALLERY ARROW BUTTONS WITH SVG SUPPORT
======================================== */
.gpp-gallery-arrow {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,245,245,0.95) 100%);
    color: #333;
    border: 2px solid rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
}

.gpp-gallery-arrow img {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) saturate(100%);
    transition: filter 0.25s;
}

.gpp-gallery-arrow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    opacity: 0;
    transition: opacity 0.25s;
}

.gpp-gallery-arrow:hover::before {
    opacity: 1;
}

.gpp-gallery-arrow:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.12);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2), 0 2px 5px rgba(0,0,0,0.1);
}

.gpp-gallery-arrow:hover img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1573%) hue-rotate(201deg) brightness(97%) contrast(97%);
}

.gpp-gallery-arrow:active {
    transform: scale(0.98);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.gpp-gallery-prev {
    margin-right: 2px;
}

.gpp-gallery-next {
    margin-left: 2px;
}

/* ========================================
   LIGHTBOX
======================================== */
.gpp-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gpp-lightbox {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpp-lightbox-content {
    width: 100%;
    height: calc(100% - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpp-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.gpp-lightbox-content iframe {
    width: 100%;
    height: 100%;
    max-width: 1000px;
    max-height: 600px;
    border-radius: 4px;
}

.gpp-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* ========================================
   LIGHTBOX NAVIGATION BUTTONS WITH SVG SUPPORT
======================================== */
.gpp-lightbox-prev,
.gpp-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gpp-lightbox-prev img,
.gpp-lightbox-next img {
    width: 24px;
    height: 24px;
    display: block;
    filter: brightness(0) invert(1);
    transition: filter 0.2s;
}

.gpp-lightbox-prev:hover,
.gpp-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.gpp-lightbox-prev:hover img,
.gpp-lightbox-next:hover img {
    filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255,255,255,0.5));
}

.gpp-lightbox-prev {
    left: 20px;
}

.gpp-lightbox-next {
    right: 20px;
}

.gpp-lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0 0 4px 4px;
}

.gpp-lightbox-counter {
    opacity: 0.7;
    font-size: 12px;
    margin-top: 5px;
    display: inline-block;
}

/* ========================================
   RESPONSIVE - MOBILE (768px and below)
   SLIM MENU ONLY, NO BACKGROUNDS
======================================== */
@media (max-width: 768px) {
    /* Force slim/collapsed state on mobile */
    .gpp-sidepanel {
        width: 50px !important;
        padding: 10px 5px;
    }

    .gpp-sidepanel.gpp-state-slim,
    .gpp-sidepanel.gpp-state-expanded {
        width: 50px !important;
    }

    /* Hide toggle button on mobile - always slim */
    .gpp-sidepanel-toggle {
        display: none;
    }

    .gpp-sidepanel-inner {
        margin-top: 10px;
    }

    /* Category styling - NO background */
    .gpp-category {
        padding: 6px 4px;
        text-align: center;
        margin-bottom: 4px;
    }

    .gpp-category-header {
        flex-direction: column;
        gap: 2px;
        padding: 4px;
        background: transparent !important;
    }

    /* Hide category name on mobile */
    .gpp-category-name {
        display: none !important;
    }

    /* Hide subcategories on mobile */
    .gpp-category-subcategories {
        display: none !important;
    }

    /* Icon sizing for mobile */
    .gpp-category-icon {
        width: 28px;
        height: 28px;
    }

    /* Dashicons sizing on mobile */
    .gpp-category-header .dashicons {
        font-size: 28px !important;
        width: 28px !important;
        height: 28px !important;
    }

    /* Gallery adjustments */
    .gpp-popup-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gpp-lightbox {
        width: 95%;
        height: 95%;
    }

    .gpp-lightbox-prev,
    .gpp-lightbox-next {
        width: 40px;
        height: 40px;
    }

    .gpp-lightbox-prev img,
    .gpp-lightbox-next img {
        width: 20px;
        height: 20px;
    }

    .gpp-lightbox-prev {
        left: 10px;
    }

    .gpp-lightbox-next {
        right: 10px;
    }

    .gpp-lightbox-close {
        top: -45px;
        width: 45px;
        height: 45px;
        font-size: 28px;
    }

    .gpp-lightbox-caption {
        font-size: 13px;
        padding: 12px 15px;
    }

    .gpp-gallery-item {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
    }

    .gpp-gallery-arrow {
        width: 34px;
        height: 34px;
    }

    .gpp-gallery-arrow img {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .gpp-sidepanel {
        width: 45px !important;
    }

    .gpp-category-icon {
        width: 24px;
        height: 24px;
    }

    .gpp-category-header .dashicons {
        font-size: 24px !important;
        width: 24px !important;
        height: 24px !important;
    }

    .gpp-popup-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .gpp-gallery-item {
        min-height: 80px;
    }

    .gpp-popup-title {
        font-size: 16px;
    }

    .gpp-popup-description {
        font-size: 13px;
    }
}

/* ========================================
   LEAFLET POPUP CUSTOMIZATION
======================================== */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gpp-popup-content {
    margin: 15px;
}

.leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   RTL (RIGHT-TO-LEFT) SUPPORT - ULTRA STRONG
   Maximum specificity for checkmarks
======================================== */

/* RTL: Container direction */
.gpp-map-container.gpp-rtl {
    direction: rtl;
}

/* RTL: Flip sidepanel to right side */
.gpp-map-container.gpp-rtl .gpp-sidepanel {
    left: auto !important;
    right: 0 !important;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   RTL: TOGGLE BUTTON
======================================== */
.gpp-map-container.gpp-rtl .gpp-sidepanel-toggle {
    right: auto !important;
    left: 10px !important;
    z-index: 1001 !important;
}

.gpp-map-container.gpp-rtl .gpp-sidepanel-toggle-icon {
    transform: scaleX(-1);
}

.gpp-map-container.gpp-rtl .gpp-sidepanel.gpp-state-full .gpp-sidepanel-toggle-icon {
    transform: scaleX(-1) rotate(180deg);
}

/* ========================================
   RTL: FLOATING MENU
======================================== */
.gpp-map-container.gpp-rtl .gpp-floating-submenu {
    left: auto !important;
    right: 65px !important;
    transform: translateX(10px);
}

.gpp-map-container.gpp-rtl .gpp-floating-submenu.gpp-show {
    transform: translateX(0);
}

/* ========================================
   RTL: LEAFLET CONTROLS
======================================== */
.gpp-map-container.gpp-rtl .leaflet-top.leaflet-right {
    right: auto !important;
    left: 10px !important;
}

.gpp-map-container.gpp-rtl .leaflet-bottom.leaflet-right {
    right: auto !important;
    left: 10px !important;
}

.gpp-map-container.gpp-rtl .leaflet-control-layers {
    right: auto !important;
    left: 0 !important;
}

.gpp-map-container.gpp-rtl .leaflet-control-attribution {
    right: auto !important;
    left: 0 !important;
}

/* ========================================
   RTL: CATEGORY HEADER
======================================== */
.gpp-map-container.gpp-rtl .gpp-category-name {
    text-align: right;
}

.gpp-map-container.gpp-rtl .gpp-category-header {
    flex-direction: row-reverse;
}

/* ========================================
   RTL: CHECKMARKS - ULTRA STRONG SELECTORS
======================================== */

/* ALL subcategory items - maximum specificity */
.gpp-map-container.gpp-rtl .gpp-subcategory-item,
.gpp-map-container.gpp-rtl .gpp-category-subcategories .gpp-subcategory-item,
.gpp-map-container.gpp-rtl .gpp-floating-submenu .gpp-subcategory-item,
.gpp-map-container.gpp-rtl label.gpp-subcategory-item {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-end !important;
    text-align: right !important;
    flex-wrap: nowrap !important;
}

/* ALL checkboxes - come AFTER text */
.gpp-map-container.gpp-rtl .gpp-subcategory-item input[type="checkbox"],
.gpp-map-container.gpp-rtl .gpp-category-subcategories .gpp-subcategory-item input[type="checkbox"],
.gpp-map-container.gpp-rtl .gpp-floating-submenu .gpp-subcategory-item input[type="checkbox"],
.gpp-map-container.gpp-rtl label.gpp-subcategory-item input[type="checkbox"] {
    order: 999 !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

/* ALL subcategory names - come BEFORE checkbox */
.gpp-map-container.gpp-rtl .gpp-subcategory-name,
.gpp-map-container.gpp-rtl .gpp-category-subcategories .gpp-subcategory-name,
.gpp-map-container.gpp-rtl .gpp-floating-submenu .gpp-subcategory-name,
.gpp-map-container.gpp-rtl label.gpp-subcategory-item .gpp-subcategory-name {
    order: 1 !important;
    flex: 1 !important;
    text-align: right !important;
}

/* ========================================
   RTL: GALLERY ARROWS
======================================== */
.gpp-map-container.gpp-rtl .gpp-gallery-prev {
    margin-right: 0 !important;
    margin-left: 2px !important;
}

.gpp-map-container.gpp-rtl .gpp-gallery-next {
    margin-left: 0 !important;
    margin-right: 2px !important;
}

.gpp-map-container.gpp-rtl .gpp-gallery-arrow {
    transform: scaleX(-1);
}

.gpp-map-container.gpp-rtl .gpp-gallery-arrow:hover {
    transform: scaleX(-1) scale(1.05);
}

.gpp-map-container.gpp-rtl .gpp-gallery-arrow:active {
    transform: scaleX(-1) scale(0.98);
}

.gpp-map-container.gpp-rtl .gpp-gallery-container {
    direction: rtl;
}

/* ========================================
   RTL: POPUP CONTENT
======================================== */
.gpp-map-container.gpp-rtl .leaflet-popup-content {
    text-align: right;
    direction: rtl;
}

.gpp-map-container.gpp-rtl .gpp-popup-title {
    text-align: right;
}

.gpp-map-container.gpp-rtl .gpp-popup-description {
    text-align: right;
}

/* ========================================
   RTL: STORE DATA
======================================== */
.gpp-map-container.gpp-rtl .gpp-store-data {
    text-align: right;
}

.gpp-map-container.gpp-rtl .gpp-store-data strong {
    margin-right: 0;
    margin-left: 6px;
}

/* ========================================
   RTL - MOBILE RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .gpp-map-container.gpp-rtl .gpp-sidepanel {
        right: 0;
        left: auto;
    }

    .gpp-map-container.gpp-rtl .gpp-sidepanel-toggle {
        left: 8px !important;
        right: auto !important;
    }

    .gpp-map-container.gpp-rtl .gpp-floating-submenu {
        right: 65px !important;
        left: auto !important;
    }

    .gpp-map-container.gpp-rtl .leaflet-top.leaflet-right {
        left: 8px !important;
        right: auto !important;
    }

    .gpp-map-container.gpp-rtl .leaflet-control-layers {
        left: 0 !important;
        right: auto !important;
    }
}

/* ========================================
   FIX: Remove white strip
======================================== */
.gpp-frontend-map-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.gpp-frontend-map {
    margin: 0 !important;
    padding: 0 !important;
}

.leaflet-container {
    margin: 0;
    padding: 0;
}

.entry-content .gpp-frontend-map-wrapper,
.wp-block-post-content .gpp-frontend-map-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ========================================
   STORE DISPLAY MODES
======================================== */

/* Full Mode - Default (already styled above) */

/* Accordion Mode */
.gpp-store-accordion {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.gpp-store-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
}

.gpp-store-accordion-header:hover {
    background: #e9ecef;
}

.gpp-store-accordion-title {
    font-weight: 600;
    font-size: 14px;
}

.gpp-store-accordion-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.gpp-store-accordion-body {
    padding: 12px 15px;
    border-top: 1px solid #ddd;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Info Icon Mode */
.gpp-store-info-icon-wrapper {
    margin: 15px 0;
}

.gpp-store-info-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gpp-store-info-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.gpp-store-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.gpp-store-info-modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gpp-store-info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.gpp-store-info-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.gpp-store-info-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
}

.gpp-store-info-modal-close:hover {
    color: #333;
}

/* Minimal Mode */
.gpp-store-minimal {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gpp-store-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    font-size: 20px;
    cursor: help;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gpp-store-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gpp-store-icon a {
    color: inherit;
    text-decoration: none;
}

/* Tooltip on hover */
.gpp-store-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 5px;
}

.gpp-store-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.gpp-store-icon:hover::after,
.gpp-store-icon:hover::before {
    opacity: 1;
}

/* RTL Support for Store Modes */
.gpp-rtl .gpp-store-data {
    text-align: right;
}

.gpp-rtl .gpp-store-accordion-header {
    flex-direction: row-reverse;
}

.gpp-rtl .gpp-store-minimal {
    direction: rtl;
}

/* Mobile Responsiveness for Store Modes */
@media (max-width: 782px) {
    .gpp-store-accordion-body {
        font-size: 13px;
    }

    .gpp-store-info-modal-content {
        width: 95%;
        padding: 15px;
    }

    .gpp-store-minimal {
        gap: 10px;
    }

    .gpp-store-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    /* Hide tooltips on mobile */
    .gpp-store-icon::after,
    .gpp-store-icon::before {
        display: none;
    }
}




/* ============================================
   assets/css/frontend-map-overrides.css
   Minimal fixes for Pinpoint search control
============================================ */

/* Allow Search Points box to sit beside the address geocoder */
.leaflet-bottom.leaflet-left .gpp-search-control.leaflet-control {
    float: none !important;
    clear: none !important;
}

/* Ensure cloned geocoder input always displays */
.gpp-search-control .leaflet-control-geocoder-form input,
.gpp-search-control input.leaflet-control-geocoder-input {
    display: block !important;
}


/* ========================================
  SHOPPOINT ICONS
======================================== */

.gpp-inline-icon{
    width:23px;
}




/* ========================================
   DUAL SEARCH TOGGLE COMPONENT
======================================== */
.gpp-dual-search-wrapper {
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    width: 300px;
}

.gpp-dual-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.gpp-dual-search-title {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.gpp-dual-search-toggle {
    display: flex;
    gap: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    padding: 3px;
}

.gpp-dual-search-toggle span {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    user-select: none;
}

.gpp-dual-search-toggle span.active {
    background: white;
    color: #667eea;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gpp-dual-search-toggle span:hover:not(.active) {
    color: white;
    background: rgba(255,255,255,0.15);
}

.gpp-dual-search-container {
    position: relative;
    height: 52px;
    background: white;
    border-radius: 0 0 8px 8px;
    overflow: visible;
}

/* CRITICAL: Absolute positioning for overlapping */
.gpp-dual-search-container > * {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.gpp-dual-search-container > .gpp-search-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 2 !important;
}

/* Hide results when control is not active */
.gpp-dual-search-container > *:not(.gpp-search-active) .leaflet-control-geocoder-alternatives {
    display: none !important;
}

/* Override leaflet geocoder styles inside wrapper */
.gpp-dual-search-wrapper .leaflet-control-geocoder {
    border-radius: 0 !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder-form {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
    display: block !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder-icon {
    display: none !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder input,
.gpp-dual-search-wrapper .gpp-search-control input {
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    width: 100% !important;
    height: 40px !important;
    line-height: 20px !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s !important;
    margin: 0 !important;
    background: white !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder input:focus,
.gpp-dual-search-wrapper .gpp-search-control input:focus {
    border-color: #667eea !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Point search styling inside wrapper */
.gpp-dual-search-wrapper .gpp-search-control {
    display: flex !important;
    align-items: center !important;
}

/* Geocoder results dropdown - position based on wrapper location */
.gpp-dual-search-wrapper .leaflet-control-geocoder-alternatives {
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    position: absolute !important;
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    z-index: 1001 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Default: dropdown below (for top position) */
.gpp-dual-search-wrapper:not(.gpp-position-bottom) .leaflet-control-geocoder-alternatives {
    top: 46px !important;
    bottom: auto !important;
    margin-top: 4px !important;
}

/* When at bottom: dropdown above */
.gpp-dual-search-wrapper.gpp-position-bottom .leaflet-control-geocoder-alternatives {
    bottom: 46px !important;
    top: auto !important;
    margin-bottom: 4px !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder-alternatives a {
    padding: 8px 12px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    display: block !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder-alternatives a:hover {
    background: #f8f9fa !important;
}

.gpp-dual-search-wrapper .leaflet-control-geocoder-alternatives a:last-child {
    border-bottom: none !important;
}

/* Hide suggestions using Leaflet's class (gentler than display:none) */
.leaflet-control-geocoder-alternatives-minimized {
    display: none !important;
}

/* ========================================
   MOBILE SEARCH TOGGLE BUTTON
======================================== */
.gpp-mobile-search-toggle {
    position: absolute;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.2s;
    padding: 0;
}

.gpp-mobile-search-toggle svg {
    color: white;
}

.gpp-mobile-search-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.gpp-mobile-search-toggle:active {
    transform: scale(0.95);
}

/* Mobile close button */
.gpp-mobile-search-close {
    display: none;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    margin-right: 8px;
}

.gpp-mobile-search-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ========================================
   MOBILE RESPONSIVENESS
======================================== */
@media (max-width: 768px) {
    /* Show mobile toggle button */
    .gpp-mobile-search-toggle {
        display: flex;
    }
    
    /* Hide wrapper by default on mobile */
    .gpp-dual-search-wrapper.gpp-mobile-collapsed {
        display: none !important;
    }
    
    /* Show close button on mobile */
    .gpp-mobile-search-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gpp-dual-search-header {
        padding-left: 8px;
    }
    
    /* On mobile when expanded, position in center-bottom */
    .gpp-dual-search-wrapper:not(.gpp-mobile-collapsed) {
        position: fixed !important;
        bottom: 20px !important;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100vw - 40px) !important;
        max-width: 340px !important;
    }
    
    /* Dropdown always goes up on mobile */
    .gpp-dual-search-wrapper:not(.gpp-mobile-collapsed) .leaflet-control-geocoder-alternatives {
        bottom: 46px !important;
        top: auto !important;
        margin-bottom: 4px !important;
    }
    
    .gpp-dual-search-container {
        height: 48px;
    }
    
    .gpp-dual-search-container > * {
        height: 36px !important;
        top: 6px !important;
    }
    
    .gpp-dual-search-wrapper .leaflet-control-geocoder-form {
        height: 36px !important;
    }
    
    .gpp-dual-search-wrapper .leaflet-control-geocoder input,
    .gpp-dual-search-wrapper .gpp-search-control input {
        padding: 8px 12px !important;
        font-size: 13px !important;
        height: 36px !important;
    }
}

@media (max-width: 480px) {
    .gpp-dual-search-wrapper:not(.gpp-mobile-collapsed) {
        width: calc(100vw - 30px) !important;
        max-width: 300px !important;
    }
    
    .gpp-dual-search-title {
        font-size: 12px;
    }
    
    .gpp-dual-search-toggle span {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* ========================================
   RTL SUPPORT
======================================== */
.gpp-dual-search-wrapper.gpp-rtl {
    direction: rtl;
}

.gpp-dual-search-wrapper.gpp-rtl .gpp-dual-search-header {
    flex-direction: row-reverse;
}

.gpp-dual-search-wrapper.gpp-rtl .gpp-dual-search-toggle {
    flex-direction: row-reverse;
}

.gpp-dual-search-wrapper.gpp-rtl input {
    text-align: right !important;
    direction: rtl !important;
}

.gpp-dual-search-wrapper.gpp-rtl .leaflet-control-geocoder-alternatives {
    text-align: right !important;
}

.gpp-rtl .gpp-mobile-search-close {
    margin-right: 0;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .gpp-rtl .gpp-dual-search-header {
        padding-right: 8px;
        padding-left: 14px;
    }
}

/* ========================================
   COMPREHENSIVE CONTROL POSITIONING
   ALL map controls respect sidepanel and stack properly
======================================== */

/* Remove default Leaflet positioning - JavaScript will handle it */
.leaflet-control-zoom.leaflet-bar.leaflet-control,
.leaflet-control-layers.leaflet-control,
.leaflet-control-gpp-filter {
    position: absolute !important;
    /* Positioning values set by applySmartControlPositioning() */
}

/* Layers control styling improvements */
.leaflet-control-layers {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    border: none !important;
}

.leaflet-control-layers-expanded {
    padding: 8px 12px !important;
    background: white !important;
    min-width: 200px !important;
}

.leaflet-control-layers-toggle {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0xMSAyMUg0YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDVsNSA1djMiLz48cGF0aCBkPSJNMTQgM3Y0YTIgMiAwIDAgMCAyIDJoNCIvPjxjaXJjbGUgY3g9IjE3IiBjeT0iMTciIHI9IjMiLz48cGF0aCBkPSJtMjEgMjEtMS41LTEuNSIvPjwvc3ZnPg==') !important;
    width: 36px !important;
    height: 36px !important;
    background-size: 20px 20px !important;
    background-position: center !important;
}

.leaflet-control-layers-list {
    margin: 0 !important;
}

.leaflet-control-layers-base label,
.leaflet-control-layers-overlays label {
    padding: 6px 0 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
}

.leaflet-control-layers-base label input,
.leaflet-control-layers-overlays label input {
    margin-right: 8px !important;
}

.leaflet-control-layers-separator {
    margin: 8px 0 !important;
    border-top: 1px solid #e0e0e0 !important;
}

/* Ensure controls don't overlap when layers is expanded */
.leaflet-control-layers-expanded {
    z-index: 1001 !important;
}

/* On mobile, adjust control sizing */
@media (max-width: 768px) {
    .leaflet-control-zoom.leaflet-bar.leaflet-control {
        /* Mobile zoom positioning handled by JS */
    }
    
    .leaflet-control-layers {
        /* Mobile layers positioning handled by JS */
    }
    
    .leaflet-control-layers-toggle {
        width: 32px !important;
        height: 32px !important;
    }
    
    .leaflet-control-layers-expanded {
        min-width: 160px !important;
        font-size: 13px !important;
    }
}

