/* ==========================================================================
   TKD PRO MANAGER - HOJA DE ESTILOS GENERAL Y SISTEMA DE DISEÑO (GENERAL.CSS)
   ========================================================================== 
   Contiene los tokens de diseño globales y los componentes estéticos reutilizables
   de toda la aplicación (Combos de Selección de Grados, Modales, Botones, etc.).
   ========================================================================== */

:root {
  --bg-primary: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --accent-blue: #2563EB;
  --accent-hover: #1D4ED8;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-color: #CBD5E1;
  --danger-color: #EF4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ==========================================================================
   1. COMBO REUTILIZABLE DE SELECCIÓN DE GRADOS (CUSTOM SELECT DE CINTURONES)
   ========================================================================== */

.custom-select-wrapper,
.custom-select-wrapper-compact,
.custom-belt-select {
  position: relative;
  user-select: none;
}

.custom-select-wrapper-compact {
  min-width: 135px;
  max-width: 180px;
}

/* Disparador / Botón Visible del Combo */
.custom-select-trigger {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  color: #0F172A;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.custom-select-trigger-compact {
  height: 36px;
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  color: #0F172A;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.custom-select-trigger:hover,
.custom-select-trigger-compact:hover {
  border-color: #2563EB;
}

/* Cuadro de Color de Cinturón (Badge de Grado) */
.custom-select-color {
  width: 28px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Menú Desplegable Flotante (Popover / Dropdown Options) */
.custom-select-options,
.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-height: 240px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  display: none;
  padding: 4px;
}

.custom-select-wrapper.active,
.custom-select-wrapper-compact.active {
  z-index: 10000;
}

.custom-select-wrapper.active .custom-select-options,
.custom-select-wrapper-compact.active .custom-select-options,
.custom-belt-select.open .custom-select-menu {
  display: block;
}

.custom-select-wrapper-compact .custom-select-options {
  width: max-content;
  min-width: 100%;
}

/* Ítems u Opciones del Desplegable */
.custom-select-option {
  padding: 4px 10px;
  margin-bottom: 2px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #0F172A;
  white-space: nowrap;
}

.custom-select-option:hover {
  background: #F1F5F9;
  color: #2563EB;
}

.custom-select-option.selected {
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 700;
}

.custom-select-option:last-child {
  margin-bottom: 0;
}