* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Control Buttons */
.controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn svg {
    color: #333;
}

/* Property Drawer */
.property-drawer {
    position: fixed;
    bottom: -100%;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.property-drawer.active {
    bottom: 20px;
}

.close-drawer {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-drawer:hover {
    background: #f0f0f0;
}

.close-drawer svg {
    color: #666;
}

.drawer-content {
    padding: 24px;
}

.drawer-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-right: 40px;
}

.property-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 10px;
    border-left: 3px solid #333;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Lot Labels */
.lot-label {
    background: transparent;
    border: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 4px rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    pointer-events: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Lot Hover Tooltips */
.lot-tooltip {
    background: rgba(26, 26, 26, 0.95) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 14px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4) !important;
    transition: opacity 0.2s ease-in-out !important;
    pointer-events: none !important;
}

.lot-tooltip::before {
    display: none !important;
}

.leaflet-tooltip-top,
.leaflet-tooltip-bottom,
.leaflet-tooltip-left,
.leaflet-tooltip-right {
    transition: opacity 0.2s ease-in-out !important;
}

/* Leaflet Custom Styles */
.leaflet-control-layers {
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom {
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 20px !important;
    border: none !important;
    color: #333 !important;
}

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

/* Legend */
.legend {
    position: fixed;
    bottom: 20px;
    left: 10px;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.legend-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .property-drawer {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 400px;
        margin: 0 auto;
    }

    .property-drawer.active {
        bottom: 10px;
    }

    .controls {
        top: 10px;
        right: 10px;
    }

    .drawer-content h2 {
        font-size: 24px;
    }

    .detail-value {
        font-size: 18px;
    }

    .legend {
        bottom: 10px;
        font-size: 12px;
        padding: 10px 12px;
    }

    .legend-color {
        width: 16px;
        height: 16px;
    }

    .legend-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .drawer-content {
        padding: 20px;
    }

    .drawer-content h2 {
        font-size: 22px;
    }

    .detail-value {
        font-size: 16px;
    }
}
