/**
 * DMS Maps - CSS Styles
 */

/* Container */
.dms-map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.dms-map {
    width: 100%;
    height: 500px;
    z-index: 1;
}

/* Empty state */
.dms-map-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.dms-map-empty p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Custom marker */
.dms-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dms-map-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.dms-map-marker:hover svg {
    transform: scale(1.1);
}

/* Popup styles */
.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 250px;
}

.leaflet-popup-close-button {
    z-index: 10;
    color: #666 !important;
    font-size: 24px !important;
    padding: 8px !important;
    right: 4px !important;
    top: 4px !important;
}

.leaflet-popup-close-button:hover {
    color: #333 !important;
}

/* Default popup content */
.dms-map-popup-content {
    padding: 16px;
}

.dms-map-popup-image {
    margin: -16px -16px 16px -16px;
    overflow: hidden;
}

.dms-map-popup-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.dms-map-popup-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.dms-map-popup-address,
.dms-map-popup-phone,
.dms-map-popup-email {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #555;
}

.dms-map-popup-address i,
.dms-map-popup-phone i,
.dms-map-popup-email i,
.dms-map-popup-hours i {
    flex-shrink: 0;
    width: 16px;
    font-size: 14px;
    color: #888;
}

.dms-map-popup-phone a,
.dms-map-popup-email a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dms-map-popup-phone a:hover,
.dms-map-popup-email a:hover {
    color: #0073aa;
}

.dms-map-popup-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.dms-map-popup-hours {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.dms-map-popup-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.dms-map-popup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Loading state */
.dms-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.dms-map-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e4e8ec;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: dms-map-spin 0.8s linear infinite;
}

@keyframes dms-map-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dms-map-popup-content {
        padding: 12px;
    }
    
    .dms-map-popup-title {
        font-size: 16px;
    }
    
    .dms-map-popup-image {
        margin: -12px -12px 12px -12px;
    }
    
    .dms-map-popup-image img {
        height: 120px;
    }
}

/* Leaflet overrides for better styling */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    color: #333 !important;
    background: #fff !important;
    border-bottom: 1px solid #eee !important;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-control-zoom a:hover {
    background: #f5f5f5 !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    border-radius: 4px 0 0 0;
}
