/* Custom styles for the parcel mapping application */

/* Map container adjustments */
#map {
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Custom marker icon styles */
.custom-div-icon {
    background: none;
    border: none;
}

.custom-div-icon i {
    font-size: 16px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Popup styles */
.parcel-popup {
    min-width: 200px;
}

.parcel-popup h6 {
    color: var(--bs-primary);
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

/* Loading spinner */
#loading-spinner {
    z-index: 2000;
    text-align: center;
}

/* Map controls card */
.position-absolute .card {
    backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.9) !important;
}

/* Status alert positioning */
#status-alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    min-width: 300px;
    max-width: 600px;
}

/* Upload section styling */
#upload-section .card {
    backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.95) !important;
}

/* Progress bar styling */
.progress {
    height: 4px;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .position-absolute.top-0.end-0 {
        position: fixed !important;
        top: 80px !important;
        right: 10px !important;
    }
    
    #upload-section {
        position: fixed !important;
        top: 80px !important;
        left: 10px !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    #status-alert {
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
    }
    
    .parcel-popup {
        min-width: 150px;
    }
}

/* Leaflet popup customizations for dark theme */
.leaflet-popup-content-wrapper {
    background: var(--bs-dark);
    color: var(--bs-light);
    border-radius: 8px;
}

.leaflet-popup-tip {
    background: var(--bs-dark);
}

/* Marker cluster customizations */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(13, 110, 253, 0.8) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(13, 110, 253, 0.9) !important;
    color: white !important;
}

/* Navigation bar enhancements */
.navbar-brand i {
    color: var(--bs-primary);
}

/* Modal customizations */
.modal-content {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Button group styling */
.btn-group-vertical .btn {
    border-radius: 0.375rem !important;
    margin-bottom: 2px;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Ensure proper text contrast */
.text-muted {
    color: var(--bs-secondary) !important;
}

/* Loading state improvements */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Accessibility improvements */
.btn:focus,
.btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Print styles */
@media print {
    .navbar,
    .position-absolute,
    .modal {
        display: none !important;
    }
    
    #map {
        height: 90vh !important;
    }
}
