/* Container & Map */
.evm-map-wrap{position:relative;border:1px solid #eee;border-radius:14px;overflow:hidden;box-shadow:0 6px 22px rgba(0,0,0,0.06); font-family: -apple-system, sans-serif;}
#evm-map{width:100%;height:600px; z-index: 1;}

/* Search & Filter - HIGH Z-INDEX FOR MOBILE */
.evm-search-row { display: flex; gap: 10px; margin-bottom: 15px; position: relative; z-index: 200; }
.evm-search-wrap{position:relative; flex: 1; display:flex; gap:5px; }
#evm-search{width:100%;padding:12px 15px;border:1px solid #ddd;border-radius:8px;font-size:16px;background:#fff;}
#evm-search-btn{padding:0 20px; background:#000; color:#fff; border:none; border-radius:8px; cursor:pointer;}
#evm-calendar-btn { padding: 0 15px; font-size: 20px; border: 1px solid #ddd; background: #fff; border-radius: 8px; cursor: pointer; }

/* Calendar POPUP */
.evm-calendar-modal { 
    position: absolute; 
    top: 100%; right: 0; margin-top: 5px;
    background: #fff; 
    z-index: 999999; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    border-radius: 8px; padding: 10px; width: 280px; border: 1px solid #eee;
}
.evm-calendar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.evm-cal-month { padding: 10px; text-align: center; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: bold; }
.evm-cal-month:hover { background: #eee; }
.evm-cal-month.selected { background: #000; color: #fff; }

/* Toolbar */
.evm-toolbar{position:absolute;top:12px;right:12px;z-index:1;}
.evm-button-primary { background: #fff; color: #333; border: 1px solid #ccc; padding: 8px 20px; border-radius: 50px; cursor: pointer; font-weight: 800; box-shadow:0 2px 5px rgba(0,0,0,0.1); }

/* Onboarding */
.evm-onboard-wrap { width: 100%; max-width: 100%; margin: 0 auto; padding: 20px 0; position:relative; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.evm-card { 
    background: transparent; border: none; padding: 40px 10px; 
    text-align: center; box-shadow: none; 
    display: flex; flex-direction: column; align-items: center;
}
.evm-card-image img { width: 100%; max-width: 480px; height: auto; border-radius: 20px; margin-bottom: 30px; object-fit: cover; box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.evm-price { font-size: 48px; font-weight: 800; color: #1d1d1f; margin-bottom: 12px; letter-spacing: -0.02em; }
.evm-desc { margin-bottom: 35px; font-size: 18px; color: #86868b; line-height: 1.4; max-width: 600px; font-weight: 500; }
.evm-pill-btn { background: #000; color: #fff; border: none; padding: 18px 50px; border-radius: 50px; font-weight: 600; cursor: pointer; font-size: 18px; transition: all 0.3s ease; }
.evm-pill-btn:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

/* Form Steps */
#evm-onboard-form { background: #fff; padding: 60px; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.06); margin: 0 auto 40px auto; max-width: 1000px; width: 100%; box-sizing: border-box; border: 1px solid rgba(0,0,0,0.04); }
.evm-progress-bar { height: 4px; background: #e5e5ea; border-radius: 4px; margin-bottom: 40px; overflow: hidden; }
.evm-fill { height: 100%; background: #000; width: 0; transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1); }
.evm-step-content label { display: block; font-weight: 600; margin-bottom: 10px; margin-top: 25px; color:#1d1d1f; font-size: 15px; }
.evm-step-content input, .evm-step-content textarea { width: 100%; padding: 16px 20px; border: 1px solid #d2d2d7; border-radius: 12px; font-size: 17px; background-color: #fbfbfd; transition: all 0.2s ease; box-sizing: border-box; }
.evm-step-content input:focus, .evm-step-content textarea:focus { outline: none; border-color: #000; background-color: #fff; box-shadow: 0 0 0 4px rgba(0,0,0,0.05); }
.evm-nav-btns { display: flex; justify-content: space-between; margin-top: 40px; }
.evm-nav-btns button { padding: 16px 36px; border-radius: 50px; border: none; cursor: pointer; font-weight: 600; font-size: 16px; transition: all 0.2s ease; }
#evm-next, #evm-submit { background: #000; color: #fff; }
#evm-next:hover, #evm-submit:hover { background: #333; }
#evm-back { background: #f5f5f7; color: #1d1d1f; }
#evm-back:hover { background: #e5e5ea; }

/* Mobile adjustments for expansive feel */
@media (max-width: 768px) {
    .evm-card { padding: 20px 0; }
    .evm-price { font-size: 36px; }
    #evm-onboard-form { padding: 30px 20px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
    .evm-step-content input, .evm-step-content textarea { padding: 14px 16px; font-size: 16px; }
    .evm-pill-btn { width: 100%; max-width: 300px; }
    .evm-nav-btns button { padding: 14px 24px; font-size: 15px; }
}

/* MARKERS - COLORS */
.evm-custom-marker { pointer-events: none; transition: opacity 0.3s ease; }
.evm-pin-container { display: flex; flex-direction: column; align-items: center; pointer-events: auto; position: relative; width: 80px; height: 80px; transition: transform 0.2s ease; }
.evm-pin-container:hover { transform: scale(1.1); z-index: 9999; }

/* CLICK ANIMATION */
.evm-pin-click { animation: evmClickAnim 0.2s forwards; }
@keyframes evmClickAnim {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.evm-pin-name { background: #fff; color: #222; padding: 4px 10px; border-radius: 12px; font-weight: 800; font-size: 11px; text-transform: uppercase; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); position: absolute; top: -5px; left: 50%; transform: translateX(-50%); z-index: 10; }
.evm-thumb-wrapper { width: 48px; height: 48px; background: #fff; border-radius: 10px; padding: 3px; box-shadow: 0 4px 10px rgba(0,0,0,0.25); position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 5; box-sizing: border-box; }
.evm-marker-thumb { width: 100%; height: 100%; border-radius: 7px; object-fit: cover; display: block; aspect-ratio: 1 / 1; }
.evm-pin-tip { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 10px solid #fff; position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 6; filter: drop-shadow(0 2px 1px rgba(0,0,0,0.1)); }

/* COLOR STATES */
.evm-pill-soon .evm-pin-name { background: #EF4444 !important; color: white !important; }
.evm-pill-close .evm-pin-name { background: #FFD700 !important; color: #1F2937 !important; } /* Yellow */
.evm-pill-expired .evm-pin-name { background: #9CA3AF !important; color: #374151 !important; } /* Gray */

/* Modal */
.evm-modal { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 99999999; backdrop-filter: blur(2px); }
.evm-modal-inner { background: white; border-radius: 20px; width: 800px; max-width: 92%; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
.evm-modal-close { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; background: rgba(0,0,0,0.5); color: white; border-radius: 50%; text-align: center; line-height: 32px; font-size: 20px; cursor: pointer; z-index: 20; }
.evm-video-container { width: 100%; padding-bottom: 56.25%; position: relative; background: #000; flex-shrink: 0; }
.evm-video-container iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; object-fit: cover; }
.evm-modal-content { padding: 25px 40px 30px; text-align: center; }

/* FIX: Handle long unbroken text in Title and Description */
.evm-modal-title { 
    margin: 0 0 5px; 
    font-size: 26px; 
    font-weight: 800; 
    color: #111;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.evm-modal-description {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

.evm-modal-date { margin: 0 0 20px; color: #006064; font-weight: bold; }

.evm-modal-buttons { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evm-btn { border: none; border-radius: 50px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; height: 48px; font-size: 16px; transition: transform 0.1s; box-sizing: border-box; }
.evm-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.evm-btn-primary { background: #0f3d12; color: white; flex: 1; order: 1; }
.evm-btn-share { background: #e0e0e0; color: #333; font-size: 12px; height: 32px; padding: 0 20px; border-radius: 16px; flex: 0 0 auto; text-transform: uppercase; letter-spacing: 0.5px; order: 2; }
.evm-btn-secondary { background: #103ec4; color: white; flex: 1; order: 3; }
@media (max-width: 600px) {
    .evm-modal-buttons { flex-direction: row; align-items: center; gap: 8px; }
    .evm-btn { font-size: 14px; height: 52px; }
    .evm-btn-primary, .evm-btn-secondary { flex: 2; }
    .evm-btn-share { flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 16px; display: flex; justify-content: center; align-items: center; background: #f0f0f0; }
}
/* =========================================
   ELEMENTOR COMPATIBILITY & PIN FIX
   ========================================= */

/* Elementor override: force correct pin size & thumbnail positioning */
.leaflet-marker-pane .evm-pin-container,
.evm-pin-container {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    transform: none !important;
}

.leaflet-marker-pane .evm-thumb-wrapper,
.evm-thumb-wrapper {
    width: 48px !important;
    height: 48px !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 3px !important;
    box-sizing: border-box !important;
}

.leaflet-marker-pane .evm-marker-thumb,
.evm-marker-thumb {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 7px !important;
    display: block !important;
}

.leaflet-marker-pane .evm-pin-name,
.evm-pin-name {
    top: -5px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    max-width: 90px !important;
}

.leaflet-marker-pane .evm-pin-tip,
.evm-pin-tip {
    top: 62px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}


/* === Fullscreen Mode === */
.evm-map-fullscreen {
    position: fixed !important;
    inset: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999;
    background: #fff;
}

.evm-map-fullscreen #evm-map {
    width: 100% !important;
    height: 100% !important;
}

/* Fullscreen Button Style */
.evm-fullscreen-btn {
    background: #000;
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.evm-fullscreen-btn:hover {
    opacity: 0.85;
}


/* === GPS BUTTON & MARKER === */
.evm-gps-btn {
    background: #ffffff;
    color: #007AFF; /* Apple Blue Text */
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 30px; /* Pill shape */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: none;
    pointer-events: auto;
    user-select: none;
    margin-top: 10px !important;
    margin-left: 10px !important;
    display: inline-block;
    transition: 0.2s ease;
}

.evm-gps-btn:hover {
    opacity: 0.85;
}

/* Apple Maps Style Location Dot */
.evm-gps-marker {
    background: #007AFF; /* Inner blue circle */
    border: 3.5px solid #ffffff; /* Off-white/white outer ring */
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    box-sizing: border-box;
}

/* =========================================
   STRICT MODALS & ADD BUTTON
   ========================================= */
#evm-add-btn { 
    padding: 0 24px; background: #007AFF; color: #fff; border: none; 
    border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 15px; 
    box-shadow: 0 4px 12px rgba(0,122,255,0.25); transition: transform 0.2s ease, opacity 0.2s ease; 
}
#evm-add-btn:hover { transform: scale(1.03); opacity: 0.9; }

.evm-strict-modal { 
    position: fixed; left: 0; top: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.7); display: flex; align-items: center; 
    justify-content: center; z-index: 99999999; backdrop-filter: blur(10px); 
}
.evm-strict-modal-inner { 
    background: #fff; border-radius: 20px; width: 1000px; max-width: 92%; 
    max-height: 90vh; overflow-y: auto; position: relative; 
    box-shadow: 0 24px 60px rgba(0,0,0,0.4); padding: 30px; box-sizing: border-box; 
}
.evm-strict-close { 
    position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; 
    background: #e5e5ea; color: #1d1d1f; border-radius: 50px; text-align: center; 
    line-height: 36px; font-size: 22px; cursor: pointer; z-index: 99; border: none; 
    transition: background 0.2s ease; padding: 0; font-weight: bold; 
}
.evm-strict-close:hover { background: #d1d1d6; }

/* Modal Content Resets */
.evm-add-modal-content .evm-onboard-wrap { padding: 0; }
.evm-add-modal-content #evm-onboard-form { box-shadow: none; border: none; padding: 10px; margin-bottom: 0; }

/* =========================================
   CONTINUOUS EVENT SCROLLER
   ========================================= */
.evm-scroller-wrapper {
    width: 100%;
    overflow: auto; /* Allows manual scroll interactions */
    padding: 30px 0;
    margin-top: 20px;
    position: relative;
    background: transparent;
    scrollbar-width: none; /* Hides scrollbar */
}
.evm-scroller-wrapper::-webkit-scrollbar { display: none; }

.evm-scroller-track {
    display: flex;
    gap: 20px;
    width: max-content;
}



.evm-scroller-card {
    display: flex;
    flex-direction: column;
    width: 280px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    text-decoration: none;
    color: #111;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.04);
}

.evm-scroller-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.evm-scroller-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.evm-scroller-info {
    padding: 18px;
}

.evm-scroller-info h4 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1d1d1f;
}

.evm-scroller-info p {
    margin: 0;
    font-size: 13px;
    color: #86868b;
    font-weight: 600;
}

/* Seamless infinite loop math: 
   Translate by exactly half the track width (which contains 2 identical sets of cards)
   Minus 10px to account for exactly half of the 20px gap between the two duplicate sets. */

/* Ensure the fade edges match dark themes if the site background is dark */
@media (prefers-color-scheme: dark) {
    .evm-scroller-wrapper::before { background: linear-gradient(to right, rgba(20,20,20,1), rgba(20,20,20,0)); }
    .evm-scroller-wrapper::after { background: linear-gradient(to left, rgba(20,20,20,1), rgba(20,20,20,0)); }
}

/* =========================================
   VERTICAL EVENT SCROLLER (NEW DESIGN)
   ========================================= */
.evm-v-scroller-wrapper {
    width: 100%;
    max-width: 500px;
    height: 450px;
    overflow: auto; /* Allows manual scroll interactions */
    position: relative;
    background: transparent;
    margin: 20px 0;
    scrollbar-width: none;
}
.evm-v-scroller-wrapper::-webkit-scrollbar { display: none; }

.evm-v-scroller-track {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.evm-v-scroller-wrapper:hover .evm-v-scroller-track {
    animation-play-state: paused;
}

.evm-v-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: 12px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    text-decoration: none;
    color: #111;
    border: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.evm-v-card:hover {
    transform: translateX(6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.1);
}

/* Accent line on hover */
.evm-v-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: #007AFF; transform: scaleY(0); transition: transform 0.2s ease;
    transform-origin: center;
}
.evm-v-card:hover::before { transform: scaleY(1); }

/* The Calendar Date Badge */
.evm-v-date-badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fbfbfd; border-radius: 10px; 
    min-width: 46px; height: 46px; /* Reduced from 60px to make it smaller than the thumbnail */
    border: 1px solid #eee; margin-right: 15px; margin-left: 5px;
}
.evm-v-month { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #ff3b30; }
.evm-v-day { font-size: 17px; font-weight: 800; color: #1d1d1f; line-height: 1.1; }

/* Square Image */
.evm-v-thumb {
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    min-height: 55px !important;
    aspect-ratio: 1 / 1;
    border-radius: 14px; /* Increased from 8px to give it nicely rounded corners */
    object-fit: cover; 
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.evm-v-details { flex: 1; overflow: hidden; }
.evm-v-title { margin: 0 0 5px 0; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1d1d1f; }
.evm-v-time { margin: 0; font-size: 13px; color: #86868b; font-weight: 600; }

/* Math: Translate upwards by exactly 50% plus half the 15px gap to perfectly loop */
@keyframes evm-v-infinite-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-50% - 7.5px)); } 
}

/* Dark Mode Handlers - Disabled to keep vertical scroller in Light Mode */
/*
@media (prefers-color-scheme: dark) {
    .evm-v-card { background: #222; border-color: #333; color: #eee; }
    .evm-v-date-badge { background: #111; border-color: #333; }
    .evm-v-title { color: #fff; }
    .evm-v-day { color: #fff; }
}
*/

/* =========================================
   SCROLLER COLOR STATES
   ========================================= */
/* Vertical Scroller Colors */
.evm-v-card.evm-pill-soon {
    background-color: rgba(239, 68, 68, 0.06) !important; /* Lighter faded red for very soon */
}
.evm-v-card.evm-pill-soon .evm-v-date-badge { background: #EF4444 !important; border-color: #EF4444 !important; }
.evm-v-card.evm-pill-soon .evm-v-date-badge span { color: #fff !important; }

.evm-v-card.evm-pill-close {
    background-color: rgba(255, 215, 0, 0.08) !important; /* True faded yellow for close */
}
.evm-v-card.evm-pill-close .evm-v-date-badge { background: #FFD700 !important; border-color: #FFD700 !important; }

.evm-v-card.evm-pill-expired { opacity: 0.6; filter: grayscale(100%); }

/* Force rounded corners on the vertical thumbnails */
.evm-v-thumb {
    border-radius: 6px !important; /* Slight rounded corners instead of circular */
}

/* Horizontal Scroller Colors */
.evm-scroller-card.evm-pill-soon { border: 2px solid #EF4444 !important; }
.evm-scroller-card.evm-pill-close { border: 2px solid #FFD700 !important; }
.evm-scroller-card.evm-pill-expired { opacity: 0.6; filter: grayscale(100%); }