
/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar transitions */
#sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-content {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#mainContent {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar collapsed state */
#sidebar.collapsed {
    width: 80px;
}

#sidebar.collapsed .sidebar-content {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
}

#sidebar.collapsed .sidebar-icon-only {
    opacity: 1;
    visibility: visible;
}

#sidebar:not(.collapsed) .sidebar-icon-only {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
}

/* Botão toggle sempre visível */
#sidebarToggle {
    position: relative;
    z-index: 10;
}

#toggleIcon {
    transition: transform 0.3s ease;
}

#sidebar.collapsed #toggleIcon {
    transform: rotate(180deg);
}

/* Header ajustado para versão recolhida */
#sidebar.collapsed .sidebar-header-content {
    opacity: 0;
    visibility: hidden;
    width: 0;
    overflow: hidden;
    position: absolute;
}

#sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1rem;
}

#sidebar.collapsed #sidebarToggle {
    margin: 0 auto;
}

/* Estilos para pop-ups de aspectos */
.aspectos-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.aspectos-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

/* Estilos para clusters de aspectos */
.aspectos-cluster-icon {
    background: transparent !important;
    border: none !important;
}

/* Estilos para ícones personalizados de aspectos */
.aspectos-custom-icon {
    background: transparent !important;
    border: none !important;
}

.aspectos-custom-icon div:hover {
    transform: scale(1.15);
    z-index: 1000;
}

/* Estilos para painel de filtros */
.aspectos-filter-panel {
    z-index: 1000;
}

.aspectos-filter-panel::-webkit-scrollbar {
    width: 6px;
}

.aspectos-filter-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.aspectos-filter-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.aspectos-filter-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Estilos para legenda de aspectos */
.aspectos-legend-container {
    z-index: 1000;
}

.aspectos-legend-container::-webkit-scrollbar {
    width: 6px;
}

.aspectos-legend-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.aspectos-legend-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.aspectos-legend-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ====== Seleção de células na tabela ====== */

/* Célula selecionada */
#dataTable td.cell-selected {
    background-color: #dbeafe !important;
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    position: relative;
    z-index: 1;
}

/* Hover nas células selecionáveis */
#dataTable tbody td {
    cursor: pointer;
    transition: background-color 0.1s ease;
}

#dataTable tbody td:hover:not(.cell-selected) {
    background-color: #f1f5f9 !important;
}

/* Barra de seleção flutuante */
.selection-toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    font-size: 13px;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.selection-toolbar .sel-count {
    font-weight: 600;
    color: #93c5fd;
}

.selection-toolbar button {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.selection-toolbar button:hover {
    background: rgba(255,255,255,0.2);
}

.selection-toolbar button.sel-btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.selection-toolbar button.sel-btn-primary:hover {
    background: #2563eb;
}

.selection-toolbar .sel-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
}

/* Linha selecionada */
#dataTable tbody tr.row-selected > td {
    background-color: #dbeafe !important;
}

#dataTable tbody tr.row-selected:hover > td {
    background-color: #bfdbfe !important;
}

/* ====== Refinamento visual: Sidebar e Mapa ====== */
#sidebar {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 6px 0 24px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(8px);
}

#sidebar .sidebar-header {
    border-bottom-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.6);
}

#sidebar .sidebar-content select,
#sidebar .sidebar-content button {
    border-radius: 12px;
}

#sidebar .sidebar-content button {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

#sidebar .sidebar-content button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

#mapSection #mapInterviewSummaryCard {
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

#mapSection #map {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}
