/* --- MAP CONTAINER FIX --- */
#vicipoll-map {
    width: 100%;
    height: 450px; 
    border-radius: 25px;
    z-index: 1;
    background: #f0f0f0; 
    overflow: hidden;
    border: 1px solid #eee;
}

/* --- BRANDED MAP ATTRIBUTION (BASE) --- */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85) !important;
    padding: 5px 15px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    font-size: 9px !important;
    color: #000 !important;
    border-top-left-radius: 12px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.05);
}

.leaflet-control-attribution a {
    color: #000 !important;
    text-decoration: none !important;
}

/* --- NEW SLEEK SEARCH WRAPPER --- */
.vici-search-wrapper form {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vici-search-wrapper form:focus-within {
    border-color: #000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
    transform: translateY(-1px);
}

.vici-search-wrapper input::placeholder {
    color: #bbb;
    font-weight: 400;
}

/* Ensure the Shutter Button stays circular */
.vici-search-wrapper button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
    border-radius: 50% !important;
}

.vici-search-wrapper button:hover {
    transform: scale(1.1);
    background: #333;
}

.vici-search-wrapper button .dashicons {
    margin: 0 !important; 
}

/* --- BUTTON LAYOUT (SIDE-BY-SIDE / FACING) --- */
.vici-voting-options, 
.vici-buttons-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important; 
    gap: 8px !important; 
    justify-content: center; 
    align-items: center;
    margin: 15px auto;
    width: fit-content !important; 
    max-width: 100%;
}

/* --- SOFT PILL BUTTONS (ACTION BUTTONS) --- */
.vici-state-btn { 
    border: none; 
    padding: 16px 28px; 
    border-radius: 50px !important; 
    cursor: pointer; 
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; 
    flex: none !important; 
    max-width: 200px;
    pointer-events: auto !important;
    touch-action: manipulation;
    background: #000; 
    color: #fff;
}

.vici-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* --- MAP FILTER PILLS (HORIZONTAL SCROLL TUBE) --- */
.vici-map-filters {
    width: 100%;
    margin: 0 0 20px 0;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    
    /* Vertical padding for shadow */
    padding: 10px 0 !important; 
    
    /* Hide Scrollbars */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* GHOST SPACERS: These ensure the first and last pills are never cut off */
.vici-map-filters::before {
    content: '';
    flex: 0 0 20px !important; /* Forces 20px of space on the left */
}

.vici-map-filters::after {
    content: '';
    flex: 0 0 20px !important; /* Forces 20px of space on the right */
}

.vici-map-filters::-webkit-scrollbar {
    display: none;
}

.vici-filter-btn { 
    flex: 0 0 auto !important; /* Prevents button from shrinking */
    white-space: nowrap !important;
    margin-right: 10px; /* Space between pills */
    border: 1px solid #eee; 
    padding: 10px 22px; 
    border-radius: 30px !important; 
    cursor: pointer; 
    background: #ffffff; 
    color: #666;
    font-size: 0.9rem;    
    font-weight: 800;
    transition: all 0.2s ease;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.vici-filter-btn.active { 
    background: #000000; 
    color: #ffffff; 
    border-color: #000;
}

/* --- MAP DOTS & PULSE --- */
.vici-dot { background: none !important; border: none !important; }

.vici-dot-inner {
    width: 6px !important; 
    height: 6px !important;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.vici-dot-inner::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: inherit; 
    animation: viciPulse 2s infinite ease-out;
    z-index: 1;
}

@keyframes viciPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* --- CARDS & IDENTITY BAR --- */
.vici-onboard-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.15);
    border: 1px solid #f0f0f0;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 600px) {
    /* UPDATED: Map Filter Pills Mobile Fix */
    .vici-map-filters {
        justify-content: flex-start !important; /* Forces scroll to start at index 0 */
        padding-left: 0 !important; /* Managed by the ::before spacer */
    }

    .vici-filter-btn {
        padding: 10px 18px !important; 
        font-size: 0.75rem !important;
    }

    .vici-map-filters::before {
        flex: 0 0 15px !important; /* Physical gap to prevent edge clipping */
    }
    
    /* --- REST OF THE MOBILE CODE REMAINS UNTOUCHED --- */
    .vici-search-wrapper {
        margin: 20px auto !important;
    }

    .vici-search-wrapper button {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
    }
    
    #vicipoll-map {
        height: 350px;
        border-radius: 20px;
    }
}