/* Enhanced Modern Left Panel - Login Page Theme for Government Use */

#left-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    padding: 20px 18px;
    min-width: 320px;
    max-width: 320px;
    background: #ffffff;
    z-index: 1001;
    box-shadow: 2px 0 20px rgba(0, 142, 118, 0.08);
    border-right: 1px solid rgba(0, 142, 118, 0.1);
}

/* Custom scrollbar */
#left-panel::-webkit-scrollbar {
    width: 6px;
}

#left-panel::-webkit-scrollbar-track {
    background: #F3F5F7;
    border-radius: 3px;
}

#left-panel::-webkit-scrollbar-thumb {
    background: #008E76;
    border-radius: 3px;
    opacity: 0.6;
}

#left-panel::-webkit-scrollbar-thumb:hover {
    background: #00705E;
}

#left-panel .layer-group {
    padding: 20px 14px 22px 14px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
}

#left-panel .layer-group:hover {
    background: #F3F5F7;
}

#left-panel .layer-group:not(:first-child) {
    border-top: none;
}

#left-panel .layer-group h2 {
    color: #008E76;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #008E76;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#left-panel .layer-indicator-subsection {
    margin-top: 14px;
    margin-bottom: 8px;
    height: auto;
    font-weight: 700;
    font-size: 13px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#left-panel #selection-warning {
    margin: 0 auto;
    font-weight: 600;
    font-size: 11px;
    color: #c00;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: #fee;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Select dropdowns - matching login page style */
#left-panel select {
    width: 100%;
    padding: 14px 16px;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #F3F5F7;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23008E76" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 42px;
}

#left-panel select:hover {
    border-color: #008E76;
}

#left-panel select:focus {
    outline: none;
    border-color: #008E76;
    background-color: #ffffff;
}

#left-panel select option {
    padding: 12px;
    font-weight: 500;
    background-color: #ffffff;
}

/* Appearance selectors */
#left-panel .appearance-selectors {
    margin-top: 12px;
    padding: 16px;
    background: #F3F5F7;
    border-radius: 12px;
    border: 1px solid rgba(0, 142, 118, 0.1);
}

#left-panel .appearance-selectors p {
    margin: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

/* Range slider */
#left-panel input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    transition: background 0.3s ease;
}

#left-panel input[type="range"]:hover {
    background: #d0d0d0;
}

#left-panel input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #008E76;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 142, 118, 0.3);
    transition: all 0.3s ease;
}

#left-panel input[type="range"]::-webkit-slider-thumb:hover {
    background: #00705E;
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 142, 118, 0.4);
}

#left-panel input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #008E76;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 142, 118, 0.3);
    transition: all 0.3s ease;
}

#left-panel input[type="range"]::-moz-range-thumb:hover {
    background: #00705E;
    transform: scale(1.15);
}

/* Layer tree */
#left-panel .layer-group .layer {
    display: flex;
    align-items: center;
    padding: 10px 6px;
    margin: 4px 0;
    border-radius: 8px;
    transition: background 0.2s ease;
    font-size: 13px;
    color: #333;
}

#left-panel .layer-group .layer:hover {
    background: #F3F5F7;
}

#left-panel .layer-group > details .left-panel-label {
    white-space: normal;
    margin: 0 8px;
    line-height: 1.5;
    font-weight: 500;
}

/* Details/Summary for collapsible sections */
#left-panel .layer-group summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 10px 8px;
    margin: 4px 0;
    border-radius: 8px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
    user-select: none;
}

#left-panel .layer-group summary:hover {
    background: #F3F5F7;
}

#left-panel .layer-group summary::before {
    width: 1.5em;
    height: 1.5em;
    display: inline-block;
    content: url("../img/svg/angle-right.svg");
    transition: transform 0.3s ease;
    margin-right: 6px;
}

#left-panel .layer-group details[open] > summary::before {
    transform: rotate(90deg);
}

#left-panel .layer-group details[open] > summary {
    color: #008E76;
    background: #F3F5F7;
}

/* Info button */
#left-panel .layer-group .info-button {
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    color: #008E76;
    transition: all 0.2s ease;
    border-radius: 6px;
}

#left-panel .layer-group .info-button:hover {
    background: #F3F5F7;
    transform: scale(1.1);
}

/* Checkboxes */
#left-panel input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #008E76;
    cursor: pointer;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

#left-panel input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* Buttons - matching login page button style */
#left-panel input[type="button"],
#left-panel button {
    width: 100%;
    padding: 14px 18px;
    margin: 12px 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #008E76;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 142, 118, 0.2);
}

#left-panel input[type="button"]:hover,
#left-panel button:hover {
    background-color: #00705E;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 142, 118, 0.3);
}

#left-panel input[type="button"]:active,
#left-panel button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 142, 118, 0.2);
}

#left-panel input[type="button"]:focus,
#left-panel button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 142, 118, 0.2);
}

/* Theme selector special styling */
#left-panel #theme-selector {
    margin-bottom: 12px;
    background: #F3F5F7;
    border-color: transparent;
    font-weight: 600;
}

#left-panel #theme-selector:hover {
    border-color: #008E76;
}

/* Layer visibility */
#left-panel .layer.visible {
    display: flex;
}

#left-panel .layer.hidden {
    display: none;
}

/* Nested layers indentation */
#left-panel details details {
    margin-left: 20px;
}

/* Loading state */
#left-panel.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Badges and status indicators */
#left-panel .badge {
    display: inline-block;
    padding: 3px 8px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: #32AD49;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#left-panel .badge.warning {
    background: #ef9424;
}

#left-panel .badge.error {
    background: #c00;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #left-panel {
        min-width: 280px;
        max-width: 280px;
        padding: 16px 14px;
    }

    #left-panel .layer-group h2 {
        font-size: 15px;
    }

    #left-panel select {
        padding: 12px 14px;
    }
}
