/* ===== CSS VARIABLES ===== */
.vestigingen-widget-wrapper {
    --marker-size: 25px;
}

/* ===== MAIN LAYOUT ===== */
.vestigingen-widget-wrapper {
    display: flex;
    flex-direction: row;
    gap: 60px;
    width: 100%;
}

.vestiging-linkerkolom {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vestiging-rechterkolom {
    flex: 1 1 50%;
    height: 550px;
    display: flex;
    flex-direction: column;
}

/* ===== SEARCH FIELD SECTION ===== */
.vestiging-filter-wrapper {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 3;
}

.vestiging-zoekveld {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vestiging-zoekveld:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.vestiging-zoekveld::placeholder {
    color: #999999;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.vestiging-straal-select {
    flex: 1;
    min-width: 100px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vestiging-straal-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* ===== MAP SECTION ===== */
.vestiging-kaart {
    flex: 1;
    min-height: 400px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===== MAP POPUP STYLING ===== */
.marker-popup {
    min-width: 250px;
    max-width: 300px;
    background-color: #ffffff;
    color: #333333;
    font-family: inherit;
    line-height: 1.5;
}

.marker-popup h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #004c78;
    line-height: 1.3;
}

.marker-popup .popup-section {
    margin-bottom: 8px;
}

.marker-popup .popup-section:last-child {
    margin-bottom: 0;
}

.marker-popup .popup-address {
    color: #666666;
    font-size: 14px;
    line-height: 1.4;
}

.marker-popup .popup-address div {
    margin-bottom: 2px;
}

.marker-popup .popup-hours {
    color: #f4a300;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.marker-popup .popup-hours i {
    font-size: 12px;
    opacity: 0.8;
}

.marker-popup .popup-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.marker-popup .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.marker-popup .contact-item i {
    font-size: 12px;
    color: #666666;
    width: 14px;
    text-align: center;
    opacity: 0.8;
}

.marker-popup .contact-item a {
    color: #004c78;
    text-decoration: none;
    transition: color 0.3s ease;
}

.marker-popup .contact-item a:hover {
    color: #003a5c;
    text-decoration: underline;
}

/* Website link in popup */
.marker-popup .popup-website {
    margin-top: 12px;
}

.marker-popup .website-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #004c78;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.marker-popup .website-link:hover {
    color: #003a5c;
    text-decoration: underline;
}

.marker-popup .website-link i {
    font-size: 12px;
    opacity: 0.8;
}

/* Leaflet popup styling overrides */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
}

.leaflet-popup-content {
    margin: 0;
    line-height: 1.5;
}

.leaflet-popup-tip {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== DAILY HOURS STYLING ===== */
.hours-list {
    width: 100%;
}

.marker-popup .hours-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marker-popup .hours-day {
    font-size: 13px;
    line-height: 1.4;
    color: #666666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marker-popup .day-name {
    color: #f4a300;
    font-weight: 600;
}

.marker-popup .day-hours {
    color: #666666;
    font-weight: 500;
}

/* Custom marker styling */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* ===== LOCATIONS LIST SECTION ===== */
.vestigingen-titel {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #004c78;
    padding: 0;
}

.locations-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== LOCATION ITEM STYLING ===== */
.vestiging-item {
    position: relative; /* Important for distance badge positioning */
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vestiging-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vestiging-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.vestiging-info {
    flex: 1;
    max-width: 70%;
}

.vestiging-info h4 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #004c78;
    font-size: 16px;
    line-height: 1.3;
}

.vestiging-info p {
    margin: 0;
    color: #666666;
    font-size: 14px;
    line-height: 1.4;
}

.vestiging-meta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row-reverse;
}

.vestiging-icons {
    display: flex;
    gap: 10px;
}

.icon-circle {
    background: #004c78;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.icon-circle:hover {
    background: #003a5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.vestiging-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vestiging-opening {
    color: #666666; /* Default color */
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vestiging-opening i {
    font-size: 12px;
    opacity: 0.8;
}

/* Dynamic opening hours coloring */
.vestiging-opening.is-open {
    color: #28a745 !important; /* Green for open */
}

.vestiging-opening.is-open i {
    color: #28a745 !important; /* Green icon for open */
}

.vestiging-opening.is-closed {
    color: #dc3545 !important; /* Red for closed */
}

.vestiging-opening.is-closed i {
    color: #dc3545 !important; /* Red icon for closed */
}

.vestiging-knop {
    flex-shrink: 0;
}

.toon-op-kaart {
    color: #004c78;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.toon-op-kaart:hover {
    color: #003a5c;
    transform: translateX(3px);
}

/* ===== DISTANCE BADGE ===== */
.distance {
    background-color: #007cba;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== LOADING, ERROR, AND NO RESULTS STATES ===== */
.loading, .error, .no-results {
    text-align: center;
    padding: 40px;
    color: #666666;
    font-style: italic;
}

.error {
    color: #d32f2f;
}

.no-results {
    color: #999999;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    /* Mobile-specific fixes for visibility issues */
    .vestigingen-widget-wrapper {
        min-height: 100vh;
    }
    
    .locations-container {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 300px;
    }
    
    .vestiging-item {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .vestigingen-widget-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .vestiging-linkerkolom,
    .vestiging-rechterkolom {
        flex: 1 1 100%;
    }
    
    .vestiging-rechterkolom {
        height: auto;
        max-height: 400px;
    }
    
    .vestiging-kaart {
        height: 400px;
    }
    
    .vestiging-filter-wrapper {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    /* High specificity mobile width controls to override Elementor styles */
    .vestigingen-widget-wrapper .vestiging-filter-wrapper .search-input-wrapper {
        width: 100%;
        flex: none !important;
        min-width: auto !important;
    }
    
    .vestigingen-widget-wrapper .vestiging-filter-wrapper .vestiging-straal-select {
        width: 100%;
        flex: none !important;
        min-width: auto !important;
    }
    
    .vestigingen-widget-wrapper .vestiging-zoekveld {
        width: 100% !important;
    }
    
    .search-input-wrapper {
        width: 100%;
        flex: none;
    }
    
    .vestiging-straal-select {
        width: 100% !important;
        min-width: auto;
        flex: none;
    }
    .vestiging-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .vestiging-info {
        max-width: 100%;
    }
    
    .vestiging-meta-actions {
        width: 100%;
        justify-content: space-between;
        flex-direction: row;
    }
    
    .vestiging-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .distance {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .vestigingen-widget-wrapper {
        gap: 20px;
    }
    
    .vestiging-item {
        padding: 15px;
    }
    
    .vestiging-kaart {
        height: 300px;
    }
    
    .vestiging-icons {
        gap: 8px;
    }
    
    .icon-circle {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.vestiging-zoekveld:focus,
.vestiging-straal-select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.icon-circle:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.toon-op-kaart:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ===== ANIMATION IMPROVEMENTS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vestiging-item {
    animation: fadeIn 0.3s ease-out;
}

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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