/* =========================================
   SIDEBAR - THANH QUẢN LÝ LAYER (TỰ ĐỘNG ẨN)
========================================= */
.sidebar {
    position: absolute;
    top: 0;
    left: -320px; /* Giấu hẳn phần thân ra ngoài mép trái màn hình */
    width: 320px;
    height: 100vh;
    background-color: #f8f9fa;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: left 0.4s ease-in-out;
}

/* Khi rê chuột vào sidebar hoặc mở ra thì trượt về vị trí 0 */
.sidebar:hover,
.sidebar:not(.collapsed) {
    left: 0; 
}

/* Phần tiêu đề */
.sidebar-header {
    background-color: #2e7d32;
    color: #ffffff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
}

/* Khu vực chứa nội dung */
.sidebar-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

/* Nút Mở/Đóng Sidebar (Nằm sát mép phải của sidebar) */
.sidebar-toggle {
    position: absolute;
    top: 15px;
    right: -32px; 
    width: 32px;
    height: 42px;
    background-color: rgba(46, 125, 50, 0.95);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    box-shadow: 4px 2px 8px rgba(0,0,0,0.2);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Làm mờ khi không tương tác (giống Basemap Switcher) */
    opacity: 0.3; 
    transition: all 0.3s ease-in-out;
}

.sidebar-toggle:hover,
.sidebar:hover .sidebar-toggle,
.sidebar:not(.collapsed) .sidebar-toggle {
    opacity: 1;
}

.sidebar-toggle:hover {
    background-color: #1b5e20;
}

/* =========================================
   LAYER CONTROL PANEL STYLES
========================================= */
.panel-title {
    font-size: 14px;
    color: #2e7d32;
    margin-bottom: 10px;
    font-weight: bold;
}

.empty-msg {
    font-size: 12px;
    color: #888;
    font-style: italic;
    text-align: center;
    margin: 15px 0;
}

/* Giao diện cho từng thẻ Layer được đưa vào quản lý */
.layer-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.layer-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.layer-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-card-actions input[type="color"] {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.btn-delete-layer {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 0 4px;
}

.btn-delete-layer:hover {
    color: #c9302c;
}