/**
 * RAM Maps - Stylesheet v1.2
 * RedActivaMexico Map Integration
 *
 * Table of Contents:
 * 1. CSS Variables (Visual Identity)
 * 2. Glassmorphism Core
 * 3. WoWonder Integration
 * 4. Page & Touch Gestures
 * 5. Scroll & Swipe Sections
 * 6. Search Input Styles
 * 7. Chips Container & Chips
 * 8. Layout & Google Maps Adjustments
 * 9. Info Window Styles
 * 10. Filters Panel
 * 11. Category Filters
 * 12. Responsive & Media Queries
 */

/* ==========================================================================
   1. CSS Variables (Visual Identity)
   ========================================================================== */

:root {
    /* Header Glassmorphism */
    --ram-header-bg: rgba(255, 255, 255, 0.08);
    --ram-header-border: rgba(255, 255, 255, 0.12);
    --ram-header-blur: 12px;
    --ram-header-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* General Glassmorphism */
    --ram-glass-bg: rgba(255, 255, 255, 0.08);
    --ram-glass-border: rgba(255, 255, 255, 0.12);
    --ram-glass-blur: 12px;
    --ram-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Interactions */
    --ram-hover-bg: rgba(255, 255, 255, 0.1);
    --ram-click-bg: rgba(255, 255, 255, 0.1);

    /* Transitions */
    --ram-transition: 0.2s ease;

    /* Neon Colors */
    --ram-neon-pink: rgba(255, 62, 154, 0.4);
    --ram-neon-blue: rgba(74, 144, 226, 0.35);

    /* Avatar Neon */
    --ram-avatar-neon-color: var(--ram-neon-blue);
    --ram-avatar-neon-intensity: 0.35;
    --ram-avatar-glow-bottom: 0 4px 12px var(--ram-avatar-neon-color);
    --ram-avatar-glow-header: 0 6px 16px var(--ram-avatar-neon-color);
    --ram-avatar-glow-sidebar: 0 5px 14px var(--ram-avatar-neon-color);
}

/* ==========================================================================
   2. Glassmorphism Core
   ========================================================================== */

.ram-glassmorphism {
    background: var(--ram-glass-bg) !important;
    backdrop-filter: blur(var(--ram-glass-blur));
    -webkit-backdrop-filter: blur(var(--ram-glass-blur));
    border: 1px solid var(--ram-glass-border);
    box-shadow: var(--ram-glass-shadow), var(--ram-avatar-glow-header);
    transition: var(--ram-transition);
}

@supports not (backdrop-filter: blur(1px)) {
    .ram-glassmorphism {
        background: rgba(38, 45, 52, 0.9) !important;
    }
}

/* ==========================================================================
   3. WoWonder Integration
   ========================================================================== */

/* WoWonder sidebar should appear above the map when open */
body.side_open .wo_new_left_side {
    z-index: 10000 !important;
}
body.side_open .slide_menu_backdrop {
    z-index: 9999 !important;
}

/* ==========================================================================
   4. Page & Touch Gestures
   ========================================================================== */

.ram-maps-page {
    /* Ensure viewport respects safe areas */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;

    /* Touch gestures for native app feel */
    touch-action: pan-x pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;

    /* Native scrolling momentum */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body.ram-maps-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Reset for elements that may interfere */
.ram-maps-page * {
    box-sizing: border-box;
}

/* ==========================================================================
   5. Scroll & Swipe Sections
   ========================================================================== */

/* Native Scrolling - iOS-like Momentum */
.ram-maps-scrollable {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    scroll-snap-type: y mandatory;
}

.ram-maps-scroll-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Pull to refresh indicator */
.ram-maps-pull-refresh {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(74, 144, 226, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    z-index: 10001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ram-maps-pull-refresh.active {
    top: 20px;
}

.ram-maps-pull-refresh.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

/* Touch Gestures - Swipe between sections */
.ram-maps-swipe-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-x;
}

.ram-maps-swipe-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.ram-maps-swipe-section.active {
    transform: translateX(0);
}

.ram-maps-swipe-section.prev {
    transform: translateX(-100%);
}

.ram-maps-swipe-section.next {
    transform: translateX(100%);
}

/* Swipe indicator */
.ram-maps-swipe-indicator {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ram-maps-swipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ram-maps-swipe-dot.active {
    background: #4a90e2;
    transform: scale(1.2);
}

/* ==========================================================================
   6. Search Component
   ========================================================================== */

/* --- 6.1 Search Container --- */
.ram-search-container {
    position: fixed;
    top: 88px; /* 72px header + 16px spacing */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
}

.ram-search-wrapper {
    position: relative;
    width: 100%;
}

/* --- 6.2 Search Icon --- */
.ram-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 1;
}

/* --- 6.3 Search Input --- */
.ram-search-input {
    width: 100%;
    height: 54px;
    padding: 0 52px 0 44px;
    font-size: 16px;
    font-family: inherit;
    color: #fff;
    background: rgba(32, 36, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ram-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ram-search-input:focus {
    border-color: rgba(74, 144, 226, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.ram-search-input:focus + .ram-search-icon,
.ram-search-wrapper:focus-within .ram-search-icon {
    color: rgba(255, 255, 255, 0.6);
}

/* Search icon animation while searching */
.ram-search-icon.searching {
    animation: ram-search-pulse 1s ease-in-out infinite;
}

@keyframes ram-search-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* --- 6.4 Clear Button --- */
.ram-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ram-search-clear:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.ram-search-clear.visible {
    display: flex;
}

/* --- 6.5 Search Dropdown --- */
.ram-search-dropdown {
    display: none;
    position: fixed;
    top: 150px; /* 88px container + 54px input + 8px gap */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(32, 36, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 9998;
}

.ram-search-dropdown.visible {
    display: block;
    animation: ram-dropdown-fade 0.15s ease-out;
}

@keyframes ram-dropdown-fade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* --- 6.6 Dropdown Sections --- */
/* RAM entities section - hidden until results */
.ram-search-section--entities {
    display: none;
}

.ram-search-section--entities.visible {
    display: block;
}

/* Google Places section - always visible structure, header hidden until results */
.ram-search-section--places {
    display: block;
}

.ram-search-section-header {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ram-search-section-header i {
    font-size: 13px;
    opacity: 0.8;
}

/* RAM entities section - primary results */
.ram-search-section--entities .ram-search-section-header {
    color: rgba(255, 255, 255, 0.5);
}

/* Google Places section - secondary results */
.ram-search-section--places .ram-search-section-header {
    color: rgba(255, 255, 255, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

/* --- 6.7 Search Results --- */
.ram-search-results {
    padding: 6px 8px 8px;
}

/* Loading state */
.ram-search-loading {
    padding: 20px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ram-search-loading i {
    font-size: 16px;
}

/* Empty state - no results */
.ram-search-empty {
    padding: 24px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

.ram-search-empty i {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.ram-search-empty p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Entity results (from WoWonder search) */
.ram-search-results a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: background 0.15s;
}

.ram-search-results a:last-child {
    margin-bottom: 0;
}

.ram-search-results a:hover,
.ram-search-results a.highlighted {
    background: rgba(255, 255, 255, 0.1);
}

.ram-search-results img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.ram-search-results .wo_user_name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
}

/* Entity type indicator for results */
.ram-search-results .search_result_type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

/* --- 6.8 Google Places Results --- */
.ram-places-results {
    padding: 6px 8px 8px;
}

.ram-places-results .pac-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px 10px 44px;
    margin-bottom: 2px;
    position: relative;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: none !important;
    background: transparent;
}

.ram-places-results .pac-item:last-child {
    margin-bottom: 0;
}

.ram-places-results .pac-item:hover,
.ram-places-results .pac-item.highlighted {
    background: rgba(255, 255, 255, 0.1);
}

.ram-places-results .pac-item-query {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
}

.ram-places-results .pac-item-address {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}

.ram-places-results .pac-matched {
    font-weight: 600;
    color: #6bb6ff;
}

/* Hide original Google Places container (position off-screen so items still render) */
.pac-container {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
}

/* Location icon for Google Places results */
.ram-places-results .pac-item::before {
    content: '\f041';
    font-family: FontAwesome;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.35);
}

/* --- 6.8b Recent Searches --- */
.ram-search-recent {
    padding: 8px;
}

.ram-search-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.ram-search-recent-clear {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.ram-search-recent-clear:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
}

.ram-search-recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
}

.ram-search-recent-item:hover,
.ram-search-recent-item.highlighted {
    background: rgba(255, 255, 255, 0.1);
}

.ram-search-recent-item i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    width: 20px;
    text-align: center;
}

.ram-search-recent-item span {
    font-size: 14px;
    font-weight: 400;
}

/* Empty state hint */
.ram-search-empty-hint {
    padding: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    font-style: italic;
}

/* --- 6.8c Popular Suggestions --- */
.ram-search-popular {
    padding: 8px;
}

.ram-search-popular-header {
    padding: 8px 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ram-search-popular-header i {
    font-size: 13px;
    color: #4a90e2;
}

.ram-search-popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
}

.ram-search-popular-item:hover,
.ram-search-popular-item.highlighted {
    background: rgba(255, 255, 255, 0.1);
}

.ram-search-popular-item img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.ram-search-popular-item .ram-popular-info {
    flex: 1;
    min-width: 0;
}

.ram-search-popular-item .ram-popular-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ram-search-popular-item .ram-popular-category {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

/* --- 6.8d Search Hint (desktop only) --- */
.ram-search-hint {
    padding: 12px 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .ram-search-hint {
        display: none !important;
    }
}

.ram-search-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 2px;
}

/* --- 6.9 Search Scrollbar --- */
.ram-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.ram-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.ram-search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.ram-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- 6.10 Responsive --- */
@media (max-width: 768px) {
    .ram-search-container {
        width: 92%;
    }

    .ram-search-input {
        height: 50px;
        padding: 0 52px 0 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .ram-search-dropdown {
        width: 92%;
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .ram-search-container {
        width: 94%;
    }

    .ram-search-input {
        padding: 0 52px 0 44px;
    }

    .ram-search-dropdown {
        width: 94%;
        max-height: 45vh;
    }
}

/* ==========================================================================
   7. Chips Container & Chips
   ========================================================================== */

/* Fixed main container */
#ram-dynamic-chips {
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(38, 45, 52, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    max-width: calc(100vw - 40px);
    width: auto;
    /* Hidden - WoWonder global navbar is used instead */
    display: none !important;
}

/* Internal containers */
.ram-canales-chips-container {
    width: 100%;
    max-width: 100%;
}

.ram-canales-chips-row {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding: 4px 0;
    max-width: 100%;
    justify-content: flex-start;
}

.ram-canales-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
    opacity: 0.6;
}

/* Specific chip for Companies (Corporate Green) */
.ram-canales-chip[data-entity="empresas"] {
    border-color: rgba(34, 197, 94, 0.3);
}

.ram-canales-chip[data-entity="empresas"]:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.ram-canales-chip[data-entity="empresas"].active {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.6);
    color: #22c55e;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.5);
    opacity: 1;
    transform: scale(1.05);
}

.ram-canales-chip[data-entity="empresas"].active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
    z-index: -1;
}

/* Specific chip for Organizations (Purple) */
.ram-canales-chip[data-entity="organizaciones"] {
    border-color: rgba(139, 92, 246, 0.3);
}

.ram-canales-chip[data-entity="organizaciones"]:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    color: #8b5cf6;
}

.ram-canales-chip[data-entity="organizaciones"].active {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
    color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
    opacity: 1;
    transform: scale(1.05);
}

.ram-canales-chip[data-entity="organizaciones"].active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.08));
    z-index: -1;
}

.ram-canales-chip svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

.ram-canales-chip[data-entity="empresas"].active svg {
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.8));
    transform: scale(1.1);
}

.ram-canales-chip[data-entity="organizaciones"].active svg {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8));
    transform: scale(1.1);
}

/* More subtle inactive states */
.ram-canales-chip:not(.active) svg {
    opacity: 0.4;
    filter: grayscale(0.3);
}

/* ==========================================================================
   8. Layout & Google Maps Adjustments
   ========================================================================== */

/* Ensure Google Maps controls are above the footer */
.gm-style .gm-style-cc,
.gm-style .gm-style-cc > div,
.gm-style .gm-style-cc > div > div {
    z-index: 10001 !important;
}

/* Zoom and fullscreen controls */
.gm-style .gm-style-cc button,
.gm-style .gm-style-cc > div button {
    z-index: 10001 !important;
}

/* Adjust map for fullscreen */
#ram-maps-fullscreen {
    bottom: 0 !important;
}

/* On mobile, adjust for WoWonder global navbar */
@media (max-width: 768px) {
    #ram-maps-fullscreen {
        bottom: 56px !important; /* Space for global navbar */
    }
}

/* ==========================================================================
   9. Info Window Styles
   ========================================================================== */

/* Hide Google's default InfoWindow close button */
#ram-maps-container .gm-ui-hover-effect {
    display: none !important;
}

/* ==========================================================================
   8b. InfoWindow (Marker Popup) - Clean Design
   ========================================================================== */

/* Google Maps InfoWindow - Simple dark style like dropdown */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    background: rgba(32, 36, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Subtle glow by entity type */
.gm-style .gm-style-iw-c[data-entity-type="company"] {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.25), 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.gm-style .gm-style-iw-c[data-entity-type="organization"] {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25), 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.gm-style .gm-style-iw-c[data-entity-type="page"] {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.25), 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style .gm-style-iw-tc::after {
    background: rgba(32, 36, 42, 0.96) !important;
}

.gm-style .gm-style-iw-t::after {
    display: none !important;
}

/* InfoWindow Content */
.ram-iw {
    width: 250px;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
}

.ram-iw-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.ram-iw-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ram-iw-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-right: 26px;
}

.ram-iw-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.ram-iw-info {
    flex: 1;
    min-width: 0;
}

.ram-iw-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ram-iw-name .fa-check-circle {
    color: #3b82f6;
    margin-left: 4px;
}

.ram-iw-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ram-iw-address {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    line-height: 1.4;
}

.ram-iw-address i {
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.4);
}

.ram-iw-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.ram-iw-actions-secondary {
    display: flex;
    gap: 8px;
}

.ram-iw-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.ram-iw-btn i {
    font-size: 11px;
}

.ram-iw-btn:hover {
    opacity: 0.85;
}

/* Primary button colors by entity type */
.ram-iw-btn-company {
    background: #22c55e;
    color: #fff;
}

.ram-iw-btn-organization {
    background: #8b5cf6;
    color: #fff;
}

.ram-iw-btn-page {
    background: #ef4444;
    color: #fff;
}

.ram-iw-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Mobile */
@media (max-width: 768px) {
    .ram-iw {
        width: 220px;
        padding: 12px;
    }

    .ram-iw-avatar {
        width: 40px;
        height: 40px;
    }

    .ram-iw-name {
        font-size: 13px;
    }

    .ram-iw-btn {
        padding: 7px 8px;
        font-size: 11px;
    }
}


/* Import RAM Visual Identity Variables */
@import url('../visual-identity/styles/core/variables.css');
@import url('../visual-identity/styles/core/neon-variables.css');

/* ========================================
   FLOATING FILTERS PANEL (Glassmorphism)
   ======================================== */
.ram-maps-filters-panel {
    background: rgba(38, 45, 52, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.3s ease;
}

.ram-maps-filters-panel:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.ram-maps-filters-panel h3,
.ram-maps-filters-panel h4 {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(255, 62, 154, 0.3);
}

.ram-maps-filters-panel label {
    transition: all 0.2s ease;
}

.ram-maps-filters-panel label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding-left: 4px;
}

.ram-maps-filters-panel hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========================================
   SEARCH TABS (Neon Pink)
   ======================================== */
.ram-search-mode-tab {
    background: rgba(38, 45, 52, 0.75) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
}

.ram-search-mode-tab:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.ram-search-mode-tab.active {
    background: rgba(255, 62, 154, 0.2) !important;
    color: #ff66b6 !important;
    border-color: rgba(255, 62, 154, 0.4);
    box-shadow: 0 0 20px rgba(255, 62, 154, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Note: Search input, clear button, and dropdown styles moved to Section 6 */

/* ========================================
   APPLY FILTERS BUTTON (Neon Pink)
   ======================================== */
#ram-maps-apply-filters {
    background: linear-gradient(135deg, #ff3e9a 0%, #ff66b6 100%) !important;
    border: none !important;
    box-shadow: 0 0 20px rgba(255, 62, 154, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

#ram-maps-apply-filters:hover {
    box-shadow: 0 0 30px rgba(255, 62, 154, 0.6), 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

#ram-maps-apply-filters:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(255, 62, 154, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   TOGGLE BUTTON (Glassmorphism)
   ======================================== */
#ram-maps-toggle-filters {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#ram-maps-toggle-filters:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0 16px rgba(74, 144, 226, 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ========================================
   CHECKBOXES (Custom Neon Style)
   ======================================== */
.ram-maps-filters-panel input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ram-maps-filters-panel input[type="checkbox"]:hover {
    border-color: rgba(74, 144, 226, 0.5);
    background: rgba(74, 144, 226, 0.1);
}

.ram-maps-filters-panel input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #ff3e9a 0%, #ff66b6 100%);
    border-color: #ff3e9a;
    box-shadow: 0 0 12px rgba(255, 62, 154, 0.4);
}

.ram-maps-filters-panel input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ========================================
   ENTITY TYPE LABELS
   ======================================== */
.ram-maps-filters-panel .entity-filter + span {
    color: rgba(255, 255, 255, 0.9);
}

.ram-maps-filters-panel .category-filter + span {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   SCROLLBAR (Custom Dark)
   ======================================== */
.ram-maps-filters-panel::-webkit-scrollbar {
    width: 8px;
}

.ram-maps-filters-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.ram-maps-filters-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 62, 154, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.ram-maps-filters-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 62, 154, 0.5);
    background-clip: content-box;
}

/* ========================================
   SEARCH RESULTS (Dark Theme)
   ======================================== */
#ram-maps-search-results {
    color: rgba(255, 255, 255, 0.9);
}

#ram-maps-search-results a {
    color: #ffffff;
    transition: all 0.2s ease;
}

#ram-maps-search-results a:hover {
    background: rgba(255, 62, 154, 0.1);
}

/* ========================================
   MAP CONTAINER - RAM Gradient Background
   ======================================== */

/* Subtle RAM gradient overlay on the entire map */
#ram-maps-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(74, 144, 226, 0.03) 0%,      /* Cyan */
        rgba(139, 92, 246, 0.05) 50%,     /* Purple */
        rgba(255, 62, 154, 0.03) 100%     /* Pink */
    );
    pointer-events: none;
    z-index: 0;
    animation: ram-gradient-shift 10s ease-in-out infinite;
}

/* Gradient shift animation for ambient effect */
@keyframes ram-gradient-shift {
    0%, 100% {
        background: linear-gradient(135deg,
            rgba(74, 144, 226, 0.03) 0%,
            rgba(139, 92, 246, 0.05) 50%,
            rgba(255, 62, 154, 0.03) 100%);
    }
    33% {
        background: linear-gradient(135deg,
            rgba(255, 62, 154, 0.03) 0%,
            rgba(74, 144, 226, 0.05) 50%,
            rgba(139, 92, 246, 0.03) 100%);
    }
    66% {
        background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.03) 0%,
            rgba(255, 62, 154, 0.05) 50%,
            rgba(74, 144, 226, 0.03) 100%);
    }
}

/* ========================================
   GOOGLE MAPS HIGHLIGHTED AREAS (Neon Glow)
   ======================================== */

/* Highlighted/Selected areas (when searching for cities, states) - RAM Gradient */
.gm-style > div > div > div > div > div > div > svg > g > path[fill="#34a853"],
.gm-style > div > div > div > div > div > div > svg > g > path[fill-opacity="0.4"],
.gm-style path[fill="#34a853"] {
    fill: rgba(139, 92, 246, 0.2) !important;  /* Purple translucent */
    stroke: #8b5cf6 !important;  /* Purple RAM */
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.5))      /* Cyan */
            drop-shadow(0 0 16px rgba(139, 92, 246, 0.7))     /* Purple */
            drop-shadow(0 0 24px rgba(255, 62, 154, 0.6))     /* Pink */
            drop-shadow(0 0 32px rgba(255, 102, 182, 0.3));   /* Light Pink */
    animation: ram-area-glow 3s ease-in-out infinite;
}

/* Stroke for highlighted areas - Animated gradient */
.gm-style path[stroke="#34a853"] {
    stroke: #ff3e9a !important;  /* Pink RAM */
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 12px rgba(74, 144, 226, 0.8))     /* Cyan */
            drop-shadow(0 0 20px rgba(139, 92, 246, 0.8))     /* Purple */
            drop-shadow(0 0 28px rgba(255, 62, 154, 0.9));    /* Pink */
    animation: ram-area-glow 3s ease-in-out infinite;
}

/* Area glow animation */
@keyframes ram-area-glow {
    0%, 100% {
        opacity: 0.85;
        filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.6))
                drop-shadow(0 0 16px rgba(139, 92, 246, 0.7))
                drop-shadow(0 0 24px rgba(255, 62, 154, 0.6));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(74, 144, 226, 0.9))
                drop-shadow(0 0 24px rgba(139, 92, 246, 1))
                drop-shadow(0 0 36px rgba(255, 62, 154, 0.9));
    }
}

/* Mexico country outline - Add extra neon glow via CSS */
.gm-style div[style*="z-index: 101"] path,
.gm-style div[style*="z-index: 102"] path {
    filter: drop-shadow(0 0 8px rgba(255, 62, 154, 0.6))
            drop-shadow(0 0 16px rgba(255, 62, 154, 0.4))
            drop-shadow(0 0 24px rgba(255, 62, 154, 0.2));
}

/* Apply neon glow to all administrative boundaries */
#ram-maps-container svg path[stroke*="#ff"],
#ram-maps-container svg path[stroke*="rgb(255"] {
    filter: drop-shadow(0 0 6px rgba(255, 62, 154, 0.5))
            drop-shadow(0 0 12px rgba(255, 62, 154, 0.3));
}

/* Neon glow for place highlight polygons (cities, neighborhoods) */
.gm-style > div:nth-child(1) > div:nth-child(3) > div > div:nth-child(2) svg g path {
    filter: drop-shadow(0 0 10px rgba(255, 62, 154, 0.7))
            drop-shadow(0 0 20px rgba(255, 62, 154, 0.5))
            drop-shadow(0 0 30px rgba(255, 62, 154, 0.3)) !important;
}

/* Enhanced glow for Mexico outline - RAM Logo Gradient Animation */
.ram-maps-neon-active svg path[stroke-width="3"],
.ram-maps-neon-active svg path[stroke-width="2.5"] {
    filter: drop-shadow(0 0 12px rgba(74, 144, 226, 0.6))      /* Cyan */
            drop-shadow(0 0 24px rgba(139, 92, 246, 0.6))      /* Purple */
            drop-shadow(0 0 36px rgba(255, 62, 154, 0.8))      /* Pink */
            drop-shadow(0 0 48px rgba(255, 102, 182, 0.4)) !important;  /* Light Pink */
    animation: ram-gradient-pulse 4s ease-in-out infinite;
}

/* Gradient pulse animation (Cyan → Purple → Pink) */
@keyframes ram-gradient-pulse {
    0% {
        filter: drop-shadow(0 0 16px rgba(74, 144, 226, 0.9))      /* Cyan dominant */
                drop-shadow(0 0 28px rgba(139, 92, 246, 0.5))
                drop-shadow(0 0 40px rgba(255, 62, 154, 0.3));
    }
    33% {
        filter: drop-shadow(0 0 12px rgba(74, 144, 226, 0.5))
                drop-shadow(0 0 32px rgba(139, 92, 246, 0.9))      /* Purple dominant */
                drop-shadow(0 0 44px rgba(255, 62, 154, 0.6));
    }
    66% {
        filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.3))
                drop-shadow(0 0 24px rgba(139, 92, 246, 0.6))
                drop-shadow(0 0 48px rgba(255, 62, 154, 1));       /* Pink dominant */
    }
    100% {
        filter: drop-shadow(0 0 16px rgba(74, 144, 226, 0.9))      /* Back to Cyan */
                drop-shadow(0 0 28px rgba(139, 92, 246, 0.5))
                drop-shadow(0 0 40px rgba(255, 62, 154, 0.3));
    }
}

/* ========================================
   CUSTOM MARKERS - RAM Gradient Glow
   ======================================== */

/* Add glow effect to custom circle markers */
.gm-style > div > div > div > div[style*="position: absolute"] > div > img[src*="circle"] {
    filter: drop-shadow(0 0 8px currentColor);
}

/* Marker labels with RAM gradient colors */
.gm-style .gm-style-iw-d h4,
.gm-style .gm-style-iw-d strong {
    background: linear-gradient(90deg, #4a90e2 0%, #8b5cf6 50%, #ff3e9a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .ram-maps-filters-panel {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    #ram-maps-search-input {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* ========================================
   LOADING INDICATOR
   ======================================== */

.ram-maps-loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #1a1a1a;
}

.ram-maps-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    background: rgba(38, 45, 52, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ram-maps-loading > .fa-map-marker {
    color: #4a90e2;
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.6);
    animation: ram-marker-bounce 1.5s ease-in-out infinite;
}

.ram-maps-loading-spinner {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.ram-maps-loading p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.3px;
}

@keyframes ram-marker-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Legacy class for backward compatibility */
.ram-loading {
    animation: ram-neon-pulse 2s ease-in-out infinite;
}

@keyframes ram-neon-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 62, 154, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 62, 154, 0.6);
    }
}

/* Error state */
.ram-maps-error > .fa-exclamation-circle {
    color: #f59e0b;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.ram-maps-error p {
    max-width: 280px;
    text-align: center;
    line-height: 1.5;
}

/* ========================================
   MARKER CLUSTER GROUPS (Future)
   ======================================== */
.ram-marker-cluster {
    background: rgba(74, 144, 226, 0.2);
    border: 2px solid #4a90e2;
    border-radius: 50%;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

/* ========================================
   BUTTONS GENERAL (Neon Effects)
   ======================================== */
.ram-maps-filters-panel button:not(#ram-maps-toggle-filters) {
    transition: all 0.3s ease;
}

.ram-maps-filters-panel button:not(#ram-maps-toggle-filters):hover {
    transform: translateY(-1px);
}

/* ==========================================================================
   10. Search Dropdown Overrides (Legacy IDs)
   Note: Main styles are in Section 6. These provide ID-based overrides.
   ========================================================================== */

/* Entity results - WoWonder search result structure */
#ram-maps-entity-results {
    padding: 6px 8px 8px;
}

#ram-maps-entity-results li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#ram-maps-entity-results a {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: background 0.15s;
}

#ram-maps-entity-results li:last-child a {
    margin-bottom: 0;
}

#ram-maps-entity-results a:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Avatar - spans both rows */
#ram-maps-entity-results .user-popover {
    display: contents;
}

#ram-maps-entity-results .search-user-avatar {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    width: 40px;
    height: 40px;
    float: none !important;
    margin: 0 !important;
}

#ram-maps-entity-results .search-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

/* User name - row 1 */
#ram-maps-entity-results .search-user-name {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
}

/* Verified badge */
#ram-maps-entity-results .verified-color {
    color: #4a90e2;
    font-size: 13px;
}

/* Type badge (Page, Group) - Hidden, redundant with category info */
#ram-maps-entity-results .search_result_badge {
    display: none;
}

/* Category/Info - row 2 (entity type label: Empresa/Organización/Category) */
#ram-maps-entity-results .user-lastseen {
    grid-column: 2;
    grid-row: 2;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    margin: 0;
}

/* Entity type labels are enhanced via JavaScript enhanceSearchResults() */

/* Clear float fix */
#ram-maps-entity-results .clear {
    display: none;
}

/* ==========================================================================
   11. Entity Tabs Styles
   ========================================================================== */

/* Entity tabs container */
#ram-entity-tabs-container {
    background: rgba(38, 45, 52, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
}

/* Tab hover states */
.ram-entity-tab:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-1px) !important;
}

/* Active tab states */
.ram-entity-tab.active[data-entity-type="company"] {
    border-bottom-color: #4a90e2 !important;
    color: #6bb6ff !important;
    background: rgba(74, 144, 226, 0.1) !important;
    text-shadow: 0 0 8px rgba(74, 144, 226, 0.4) !important;
}

.ram-entity-tab.active[data-entity-type="organization"] {
    border-bottom-color: #8b5cf6 !important;
    color: #b388ff !important;
    background: rgba(139, 92, 246, 0.1) !important;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4) !important;
}

.ram-entity-tab.active[data-entity-type="page"] {
    border-bottom-color: #ff3e9a !important;
    color: #ff66b6 !important;
    background: rgba(255, 62, 154, 0.1) !important;
    text-shadow: 0 0 8px rgba(255, 62, 154, 0.4) !important;
}

/* Inactive tab states */
.ram-entity-tab:not(.active) {
    border-bottom-color: transparent !important;
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
    text-shadow: none !important;
}

.ram-entity-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Tab indicator dots */
.ram-entity-tab:not(.active) span {
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   12. Entity & Category Chips Styles
   ========================================================================== */

/* Center when there are few elements */
.ram-canales-chips-row:not(.scrollable) {
    justify-content: center;
}

/* Hide scrollbar but keep functionality */
.ram-canales-chips-row::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar but keep functionality */
.ram-filter-chips-row::-webkit-scrollbar {
    display: none;
}

/* Chip hover states */
.ram-entity-chip:hover,
.ram-category-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

/* Active state for entity chips */
.ram-entity-chip.active[data-entity-type="company"] {
    border-color: #4a90e2 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(74, 144, 226, 0.6) !important;
}

.ram-entity-chip.active[data-entity-type="organization"] {
    border-color: #8b5cf6 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(139, 92, 246, 0.6) !important;
}

.ram-entity-chip.active[data-entity-type="page"] {
    border-color: #ff3e9a !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 62, 154, 0.6) !important;
}

/* Inactive state for entity chips */
.ram-entity-chip:not(.active) {
    opacity: 0.4;
    background: rgba(38, 45, 52, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    filter: grayscale(0.5);
}

/* Scroll button hover */
.ram-category-scroll-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(74, 144, 226, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 16px rgba(74, 144, 226, 0.2) !important;
    color: #4a90e2 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* ==========================================================================
   13. Responsive - Search Box & Dropdown
   ========================================================================== */

@media (max-width: 768px) {
    /* Search input - maintain icon spacing */
    #ram-maps-search-input {
        height: 50px !important;
        padding: 0 48px 0 42px !important;
        font-size: 15px !important;
    }

    /* Search icon positioning */
    .ram-search-icon {
        left: 14px !important;
        font-size: 16px !important;
    }

    /* Clear button positioning */
    #ram-maps-clear-search,
    .ram-search-clear {
        right: 10px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }

    /* Unified dropdown on mobile */
    #ram-maps-unified-dropdown {
        width: 95% !important;
        max-width: none !important;
        max-height: 60vh !important;
    }

    /* Section headers smaller */
    #ram-maps-entities-section > div:first-child span,
    #ram-places-header span {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
    }

    /* Results items more compact */
    #ram-maps-entity-results a {
        padding: 10px !important;
        margin: 6px 8px !important;
    }

    #ram-places-results-container .pac-item {
        padding: 12px 16px 12px 44px !important;
        margin: 6px 8px !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    /* Search input - maintain icon spacing on small screens */
    #ram-maps-search-input {
        height: 46px !important;
        padding: 0 44px 0 38px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }

    /* Search icon positioning */
    .ram-search-icon {
        left: 12px !important;
        font-size: 15px !important;
    }

    /* Clear button positioning */
    #ram-maps-clear-search,
    .ram-search-clear {
        right: 8px !important;
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }

    #ram-maps-unified-dropdown {
        border-radius: 16px !important;
        max-height: 50vh !important;
    }

    /* Make map controls more accessible on mobile */
    .gm-style .gm-style-iw-c {
        max-width: 280px !important;
    }

    .gm-style .gm-style-iw-d {
        max-height: 200px !important;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    #ram-maps-unified-dropdown {
        max-height: 40vh !important;
    }

    #ram-maps-horizontal-filters {
        top: 70px;
    }
}

/* ==========================================================================
   14. Responsive - Entity Tabs
   ========================================================================== */

@media (max-width: 768px) {
    /* Entity tabs container */
    #ram-entity-tabs-container {
        padding: 0 15px !important;
    }

    .ram-entity-tabs-row {
        gap: 0 !important;
    }

    /* Smaller tabs on mobile */
    .ram-entity-tab {
        padding: 12px 16px !important;
        font-size: 13px !important;
        border-bottom-width: 2px !important;
        gap: 6px !important;
    }

    .ram-entity-tab span {
        width: 6px !important;
        height: 6px !important;
    }

    /* Note: Search positioning moved to Section 6 */
}

/* Extra small devices (max-width: 480px) */
@media (max-width: 480px) {
    /* Smaller tabs on very small screens */
    .ram-entity-tab {
        padding: 10px 12px !important;
        font-size: 12px !important;
    }

    .ram-entity-tab span {
        width: 5px !important;
        height: 5px !important;
    }

    /* Note: Search positioning moved to Section 6 */
}

/* ==========================================================================
   13. Google Maps Native Controls - Dark Theme
   ========================================================================== */

/* Force fullscreen control to be visible on all devices (including mobile) */
#ram-maps-container .gm-fullscreen-control {
    display: block !important;
}

/* Dark theme for all native Google Maps controls */
#ram-maps-container .gmnoprint > div,
#ram-maps-container .gm-bundled-control .gmnoprint > div,
#ram-maps-container .gm-control-active,
#ram-maps-container .gm-fullscreen-control {
    background-color: #2a2d32 !important;
}

/* Dark theme for zoom control buttons */
#ram-maps-container .gmnoprint button,
#ram-maps-container .gm-control-active {
    background-color: #2a2d32 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Hover state for native controls */
#ram-maps-container .gmnoprint button:hover,
#ram-maps-container .gm-control-active:hover {
    background-color: #3a3d42 !important;
}

/* Active/pressed state */
#ram-maps-container .gmnoprint button:active,
#ram-maps-container .gm-control-active:active {
    background-color: #1a1d22 !important;
}

/* Fullscreen control icon color */
#ram-maps-container .gm-fullscreen-control img {
    filter: invert(1) brightness(0.9);
}

/* Zoom control +/- icons */
#ram-maps-container .gmnoprint button img {
    filter: invert(1) brightness(0.9);
}

/* Divider between zoom buttons - darker */
#ram-maps-container .gmnoprint > div > div {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================================
   14. My Location Button (Native Google Maps Control - Dark Theme)
   ========================================================================== */

/* Location button - styled as native Google Maps control with dark theme */
.ram-maps-location-btn {
    width: 40px;
    height: 40px;
    margin: 10px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    background: #2a2d32;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ram-maps-location-btn:hover {
    background: #3a3d42;
    color: #fff;
}

.ram-maps-location-btn:active {
    background: #1a1d22;
}

.ram-maps-location-btn.loading {
    pointer-events: none;
    color: rgba(255, 255, 255, 0.5);
}

.ram-maps-location-btn.loading i {
    animation: ram-spin 1s linear infinite;
}

.ram-maps-location-btn.active {
    color: #4285f4;
}

@keyframes ram-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   15. User Location Marker
   ========================================================================== */

.ram-user-location-pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.3);
    animation: ram-pulse 2s ease-out infinite;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@keyframes ram-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ==========================================================================
   16. Mobile Optimizations
   ========================================================================== */

/* Note: Search responsive styles consolidated in Section 6.9 */
