/* areams-map.css - basic styling inspired by flyer */
.areams-map-wrapper {
    font-family: Arial, Helvetica, sans-serif;
}

.areams-map-wrapper .dashicons {
    font-family: dashicons;
    display: inline-block;
    line-height: 1;
    font-weight: 400;
    font-style: normal;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.areams-toggle-buttons {
    display: none;
    gap: 10px;
    margin-bottom: 15px;
}

.areams-toggle-btn {
    flex: 1;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.areams-toggle-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.areams-toggle-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.areams-toggle-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.areams-map-parent {
    width: 100%;
    position: relative;
}

.areams-map-sites {
    flex: 0 0 33.333%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.areams-list-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.areams-list-content input {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 2px solid #f0f0f0;
    font-size: 14px;
    box-sizing: border-box;
}

.areams-list-content input:focus {
    outline: none;
    border-bottom-color: #2271b1;
}

#areams-locations {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.areams-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    position: relative;
    padding-left: 36px;
    transition: background 0.2s;
}

.areams-item:hover {
    background: #f8f9fa;
}

.areams-item .item-dot {
    position: absolute;
    left: 12px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.areams-item .item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.areams-item .item-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.3;
}

.areams-item .item-address {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.areams-item .item-description {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    margin: 6px 0;
}

.areams-item .item-phone,
.areams-item .item-email,
.areams-item .item-hours,
.areams-item .item-type {
    color: #64748b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.areams-item .item-phone .dashicons,
.areams-item .item-email .dashicons,
.areams-item .item-hours .dashicons,
.areams-item .item-type .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

.areams-item .item-link {
    display: inline-block;
    margin-top: 4px;
    color: #2271b1;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.areams-item .item-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.areams-map-container {
    flex: 0 0 66.666%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#areams-map {
    border-radius: 8px;
}

.areams-legend {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.areams-legend .legend-dots {
    display: flex;
    gap: 8px;
}

.areams-legend .legend-dots span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    border: 2px solid white;
}

.areams-pin {
    display: flex;
    align-items: center;
    justify-content: center;
}

.areams-pin svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Popup styles */
.areams-popup-wrapper .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
}

.areams-popup-wrapper .leaflet-popup-content {
    margin: 0;
    min-width: 280px;
}

.areams-popup-wrapper .leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.areams-popup-wrapper .leaflet-popup-close-button {
    color: white !important;
    font-size: 18px !important;
    font-weight: normal !important;
    padding: 4px 8px !important;
}

.areams-popup-wrapper .leaflet-popup-close-button:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.areams-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.areams-popup .popup-header {
    padding: 16px;
    color: white;
}

.areams-popup .popup-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin-bottom: 6px;
}

.areams-popup .popup-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.areams-popup .popup-description {
    padding: 12px 16px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.areams-popup .popup-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.areams-popup .popup-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.areams-popup .popup-info-item .dashicons {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: #94a3b8;
    margin-top: 1px;
}

.areams-popup .popup-info-item a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.2s;
}

.areams-popup .popup-info-item a:hover {
    color: #135e96;
    text-decoration: underline;
}

.areams-popup .popup-actions {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.areams-popup .popup-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.areams-popup .popup-btn-primary {
    background: #2271b1;
    color: white;
}

.areams-popup .popup-btn-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.areams-popup .popup-btn-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.areams-popup .popup-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .areams-popup-wrapper .leaflet-popup-content {
        min-width: 260px;
    }
    
    .areams-popup .popup-title {
        font-size: 16px;
    }
    
    .areams-popup .popup-description {
        font-size: 12px;
    }
    
    .areams-popup .popup-info-item {
        font-size: 12px;
    }
    
    .areams-popup .popup-btn {
        padding: 9px 12px;
        font-size: 12px;
    }
}

/* Cluster styles */
.areams-cluster-container {
    background: transparent !important;
    border: none !important;
}

.areams-cluster-wrapper {
    position: relative;
    height: 40px; /* match single pin anchor height */
    display: block;
}

.areams-cluster-wrapper svg {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.22));
    pointer-events: none;
    display: block;
    width: 32px; /* match single pin visual width */
    height: 32px; /* match single pin visual height */
}

/* Responsive design */
@media (max-width: 1024px) {
    .areams-toggle-buttons {
        display: flex;
    }
    
    .areams-map-parent {
        flex-direction: column !important;
    }
    
    .areams-map-sites {
        flex: none !important;
        width: 100% !important;
        height: 100% !important;
        display: none;
    }
    
    .areams-map-sites.active {
        display: flex;
    }
    
    .areams-map-container {
        flex: none !important;
        width: 100% !important;
        height: 100% !important;
        display: none;
    }
    
    .areams-map-container.active {
        display: block;
    }
}

@media (min-width: 1025px) {
    .areams-map-sites,
    .areams-map-container {
        display: flex !important;
    }
}