/* Modale "Personalizza vista" (ordine e visibilita' delle sezioni di un tab).
   Proprietario: legacy/tab-sections-preferences.js. Solo l'app la carica, subito
   dopo ds-components.css da cui viene (ADR-022 A1): l'aspetto comune a ogni
   dialogo (velo, testata, bottone di chiusura, piede) resta nel modale del
   design system, dove .tab-sections-* sono membri delle liste di .modal-*. */

/* Nascosto finche' non arriva .show */
.tab-sections-modal-overlay {
  display: none;
}

.tab-sections-modal-overlay.show {
  display: flex;
}

/* Il corpo di "Personalizza Vista" ha lo stesso ruolo del corpo di un modale. */
.tab-sections-modal-body {
  padding: var(--space-5);
  overflow-y: auto;
}

/* MODALE DELLE SEZIONI DEI TAB (spostato da style.css) */

.tab-sections-modal-overlay.show {
  opacity: 1;
}

.tab-sections-modal-overlay.show .tab-sections-modal {
  transform: scale(1);
}

.tab-sections-drag-hint {
  margin: 0 0 15px 0;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  border-left-width: 3px;
  border-left-style: solid;
}

.tab-sections-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab-sections-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  cursor: grab;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: var(--neutral-50);
  border: 2px solid transparent;
  user-select: none;
}

.tab-sections-option:active {
  cursor: grabbing;
}

.tab-sections-option.dragging {
  opacity: 0.5;
  background: var(--neutral-200);
  border-width: 2px;
  border-style: dashed;
}

.tab-sections-option.drag-over {
  transform: scale(1.02);
}

.tab-sections-drag-handle {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  cursor: grab;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.tab-sections-drag-handle:hover {
  opacity: 0.8;
}

.tab-sections-drag-handle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg-subtle);
  border-radius: 1px;
}

.tab-sections-option:active .tab-sections-drag-handle {
  cursor: grabbing;
}

.tab-sections-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.tab-sections-option-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.tab-sections-option-name {
  flex: 1;
  font-size: 15px;
  color: var(--fg-default);
  font-weight: 500;
}

.tab-sections-option:hover {
  background: var(--brand-50);
}

.tab-sections-option.dragging {
  box-shadow: var(--elevation-1);
}

.tab-sections-option input[type="checkbox"]:checked {
  accent-color: var(--brand-500);
}

/* MODALE DELLE SEZIONI: SUGGERIMENTO E STATI DELLE OPZIONI (da style-redesign.css) */

.tab-sections-drag-hint {
  background: var(--brand-50);
  color: var(--brand-700);
  border-left-color: var(--brand-500);
}

.tab-sections-option:hover {
  border-color: var(--brand-400);
}

.tab-sections-option.dragging {
  border-color: var(--brand-500);
}

.tab-sections-option.drag-over {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.tab-sections-option input[type="checkbox"] {
  accent-color: var(--brand-500);
}
