/* ==========================================================================
   THEME SWITCHER UI & PREVIEWS
   Instituto de Educación Superior Tecnológico Público "Nueva Esperanza"
   ========================================================================== */

.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
  padding: var(--space-2);
}

.theme-card-option {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  cursor: pointer;
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.theme-card-option:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.theme-card-option.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.theme-preview-strip {
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.strip-color {
  flex: 1;
  height: 100%;
}

.theme-title-text {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-check-icon {
  display: none;
  color: var(--success);
}

.theme-card-option.active .theme-check-icon {
  display: inline-block;
}

/* Theme Swatches Palettes definition */
.theme-swatch-light .strip-1 { background: #122853; }
.theme-swatch-light .strip-2 { background: #d32f2f; }
.theme-swatch-light .strip-3 { background: #f4f6fa; }

.theme-swatch-dark .strip-1 { background: #0b1120; }
.theme-swatch-dark .strip-2 { background: #3b82f6; }
.theme-swatch-dark .strip-3 { background: #1e293b; }

.theme-swatch-blue-gradient .strip-1 { background: #1e40af; }
.theme-swatch-blue-gradient .strip-2 { background: #7c3aed; }
.theme-swatch-blue-gradient .strip-3 { background: #eff6ff; }

.theme-swatch-turquoise .strip-1 { background: #042f2e; }
.theme-swatch-turquoise .strip-2 { background: #0d9488; }
.theme-swatch-turquoise .strip-3 { background: #ccfbf1; }

.theme-swatch-emerald .strip-1 { background: #064e3b; }
.theme-swatch-emerald .strip-2 { background: #059669; }
.theme-swatch-emerald .strip-3 { background: #d1fae5; }

.theme-swatch-coral-amber .strip-1 { background: #431407; }
.theme-swatch-coral-amber .strip-2 { background: #ea580c; }
.theme-swatch-coral-amber .strip-3 { background: #ffedd5; }

.theme-swatch-high-contrast .strip-1 { background: #000000; }
.theme-swatch-high-contrast .strip-2 { background: #ffff00; }
.theme-swatch-high-contrast .strip-3 { background: #00ffff; }

/* Contrast overrides for High Contrast Theme */
[data-theme="high-contrast"] .card,
[data-theme="high-contrast"] .modal-dialog,
[data-theme="high-contrast"] .form-control,
[data-theme="high-contrast"] .btn-outline,
[data-theme="high-contrast"] .stat-card,
[data-theme="high-contrast"] .teacher-card,
[data-theme="high-contrast"] .table-card {
  border: 2px solid #ffffff !important;
}

[data-theme="high-contrast"] .btn-primary {
  background-color: #ffff00 !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border: 2px solid #ffffff !important;
}

[data-theme="high-contrast"] .badge {
  border: 1px solid #ffffff !important;
  color: #ffffff !important;
}
