/* Custom styles for OpticSearch */

:root {
    --sidebar-width: 280px;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --sidebar-active: #3498db;
}

/* Wrapper */
.wrapper {
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background-color: var(--sidebar-active);
    color: #fff;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    background-color: rgba(0, 0, 0, 0.2);
    margin-top: auto;
}

.sidebar-search .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--sidebar-text);
}

.sidebar-search .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.sidebar-search .input-group-text {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--sidebar-text);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Dark theme support */
[data-bs-theme="dark"] .main-content {
    background-color: #1a1a1a;
    color: #fff;
}

/* Map container */
#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Custom marker styles */
.custom-marker {
    background: transparent;
    border: none;
}

.current-location-marker {
    background: transparent;
    border: none;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

/* Marker cluster styles */
.marker-cluster-small {
    background-color: rgba(40, 167, 69, 0.6);
}

.marker-cluster-medium {
    background-color: rgba(255, 193, 7, 0.6);
}

.marker-cluster-large {
    background-color: rgba(220, 53, 69, 0.6);
}

/* Floating buttons */
.position-fixed .btn {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Status badges */
.badge-status-active {
    background-color: #28a745;
}

.badge-status-inactive {
    background-color: #dc3545;
}

.badge-status-maintenance {
    background-color: #ffc107;
    color: #000;
}

.fiber-color-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    vertical-align: -0.15rem;
}

.fiber-color-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.5rem;
    margin-top: 0.4rem;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}
