/**
 * Multi Apartments Map - Modern Enhancements
 * Additional modern styling for the property map
 */

/* Enhanced Map Container */
.map-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: #f7f7f7;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Modern Loading State */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #6c757d;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

.map-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #11b4da;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Controls */
.maplibregl-ctrl-attrib {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    color: #6c757d !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.maplibregl-ctrl-group {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    overflow: hidden;
}

.maplibregl-ctrl-zoom-in,
.maplibregl-ctrl-zoom-out {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 20px !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.maplibregl-ctrl-zoom-in:hover,
.maplibregl-ctrl-zoom-out:hover {
    background: #ffffff !important;
    color: #11b4da !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 180, 218, 0.2) !important;
}

.maplibregl-ctrl-zoom-in:active,
.maplibregl-ctrl-zoom-out:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(17, 180, 218, 0.1) !important;
}

/* Modern Popup */
.maplibregl-popup-content {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border: none !important;
    padding: 0 !important;
    max-width: 300px !important;
    overflow: hidden;
}

.maplibregl-popup-tip {
    background: transparent !important;
    box-shadow: none !important;
}

/* Airbnb-style Popup */
.map-popup-airbnb {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
}

.popup-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popup-image:hover img {
    transform: scale(1.05);
}

.popup-content {
    padding: 16px;
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.popup-price {
    font-size: 14px;
    font-weight: 600;
    color: #007aff;
    margin-bottom: 12px;
}

.popup-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #007aff !important;
    text-decoration: none !important;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.popup-link:hover {
    color: #0056b3 !important;
}

.popup-link svg {
    transition: transform 0.2s ease;
}

.popup-link:hover svg {
    transform: translateX(2px);
}

/* Smooth Animations */
.maplibregl-marker {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.maplibregl-marker:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(17, 180, 218, 0.3));
}

/* Responsive Enhancements */


/* Reset Control */
.map-reset-control {
    background: rgba(220, 53, 69, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    overflow: hidden !important;
}

.map-reset-control .maplibregl-ctrl-reset {
    min-width: 120px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    background: #dc3545 !important;
    border: none !important;
    padding: 0 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    width: auto !important;
}

.map-reset-control .maplibregl-ctrl-reset:hover {
    background: #c82333 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3) !important;
    border: none !important;
}

.map-reset-control .maplibregl-ctrl-reset:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1) !important;
}