/* Brand color overrides for black backgrounds */
/* Loaded after main.css to force immediate visual change */

:root {
  --brand: #7d0926;
  --brand-contrast: #f6f6f6;
}

body.darkTheme .header,
.rangeValue,
.process-success,
.process-col-fail,
.politica__privacidad,
.btnPrimary,
.tabMenuProcess li.active a,
#frontPersonalization .fpHeader>div a.active,
.uploadedImage a:hover,
.loginContent,
.supNum,
.pill-selected,
.section-btn-selected,
.section-btn-selected:hover {
  background: var(--brand) !important;
  background-color: var(--brand) !important;
  color: var(--brand-contrast) !important;
  border-color: var(--brand) !important;
}

/* Specific overrides for buttons inside branded containers */
.politica__privacidad .btnPrimary { background: var(--brand-contrast) !important; color: var(--brand) !important; }
.politica__privacidad .btnSecondary { background: var(--brand) !important; border-color: var(--brand-contrast) !important; color: var(--brand-contrast) !important; }

/* Radio / checkbox checked visuals (brand instead of black) */
input[type="radio"]:checked::before,
input[type="checkbox"]:checked {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* Dark overlay tint: keep translucency but use brand hue */
.darkCover.active { background: rgba(0, 71, 107, 0.65) !important; }

/* Minor helpers */
.range-slider__progress::before { background: var(--brand) !important; }

/* ===================== Accesibilidad (WCAG 2.1 AA) ===================== */

/* Foco visible con teclado (2.4.7). main.css quita el outline a botones y campos;
   este anillo rojo con hueco blanco se ve tanto sobre fondo claro como granate.
   :root sube la especificidad para ganar a "button:focus { outline: 0 }". */
:root :focus-visible {
  outline: 2px solid #a0060e;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

/* Enlace "Saltar al contenido" (2.4.1): oculto hasta recibir el foco */
.skip-link {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 100000;
  background: #fff;
  color: #5a1111;
  border: 2px solid #a0060e;
  border-radius: 3px;
  padding: .75rem 1rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }
#main-content:focus { outline: none; box-shadow: none; }

/* Texto solo para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Contraste del placeholder >= 4,5:1 (1.4.3) */
::placeholder { color: #7a6a6a !important; opacity: 1; }
.select2-container--default .select2-selection__placeholder { color: #7a6a6a !important; }

/* Borde de los campos >= 3:1 (1.4.11). Sin !important para que el foco y el error
   de main.css sigan cambiando el color. */
.formInput,
.datepicker,
.formTextarea,
.formSelect,
.ajaxSearch,
.complexAjaxSearch,
.ajaxSearchProfessionals,
.selectAjaxSearch,
.simpleAjaxSearch,
input[type=checkbox],
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-color: #9a8c80;
}
