/* Paleta del catálogo cuando el elemento html tiene la clase high-contrast. */
.high-contrast {
  --paper: #fff;
  --white: #fff;
  --sage: #fff;
  --ink: #000;
  --muted: #000;
  --green: #000;
  --rust: #000;
  --border: #000;
  --shadow: none;
  background: #fff;
  color: #000;
}

.high-contrast :is(body, .app-shell, .topbar, .brand-icon, .skip-link, .search-wrap, .bottom-nav,
  .product-visual, .detail-cover, .detail-cover.has-photo, .photo-label,
  .cook-view, .show-view) {
  background: #fff;
  color: #000;
  box-shadow: none;
}

.high-contrast :is(.brand-subtitle, .handwritten, .eyebrow, .card-category,
  .card-description, .detail-category, .detail-description, .guide-number,
  .stock, .end-note, .end-note > span, .end-note small, .search-box > span,
  .detail-section h2 svg, .use-list li > span, .bottom-nav a) {
  color: #000;
}

.high-contrast .search-box input::placeholder {
  color: #000;
  opacity: 1;
}

.high-contrast .steps li::before {
  background: #000;
  color: #fff;
}

.high-contrast .stock::before,
.high-contrast .sheet-handle {
  background: #000;
}

/* Tarjetas, avisos y controles comparten un borde bien definido. */
.high-contrast :is(.search-box, .product-card, .idea-card, .guide-card,
  .type-card, .sheet, .font-panel, .empty-state, .detail-cover.has-photo,
  .mini-tag, .notice, .notice.safety, .notice.pending, .precautions, .advice,
  .recipe-note, .use-list li, .cook-screen, .show-item),
.high-contrast .results-toolbar #result-count {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  box-shadow: none;
}

.high-contrast .notice.safety {
  border-left-width: 8px;
}

.high-contrast .topbar {
  border-bottom: 2px solid #000;
}

.high-contrast :is(.bottom-nav, .card-footer, .voice-settings, .results-toolbar,
  .cook-controls) {
  background: #fff;
  border-top: 2px solid #000;
}

.high-contrast :is(.button-secondary, .button-plain, .pill-button, .back-button,
  .filter-button, .save-button, .favorite-action, .icon-button, .filter-chip,
  .detail-tabs a, .idea-toggle, .idea-action, .category-button, .category-visual,
  .radio-chip span, .sheet select, .sheet textarea, .reading-controls button),
.high-contrast .category-button[aria-pressed=true] .category-visual,
.high-contrast .idea-toggle[aria-expanded=true] .idea-action {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}

.high-contrast :is(.button-primary, .details-button, .listen-button.button-primary) {
  background: #ffdd64;
  color: #000;
  border: 2px solid #000;
  font-weight: 700;
}

/* Los estados seleccionados invierten el texto y los iconos. */
.high-contrast .category-button[aria-pressed=true],
.high-contrast .radio-chip input:checked + span,
.high-contrast #speech-toggle[aria-pressed=true],
.high-contrast .idea-toggle[aria-expanded=true],
.high-contrast .bottom-nav a[aria-current=page],
.high-contrast .save-button[aria-pressed=true],
.high-contrast .favorite-action[aria-pressed=true] {
  background: #000;
  color: #fff;
  border-color: #000;
}

.high-contrast #speech-toggle[aria-pressed=true] {
  box-shadow: none;
}

.high-contrast :is(.save-button, .favorite-action)[aria-pressed=true] svg {
  fill: currentColor;
}

.high-contrast .bottom-nav a[aria-current=page] > span:first-child {
  background: transparent;
  box-shadow: none;
}

.high-contrast a {
  text-decoration: underline;
}

/* El estado de la lectura comparte el fondo de la barra. */
.high-contrast .reading-bar,
.high-contrast .toast {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: none;
}

.high-contrast .reading-bar .reading-status {
  background: transparent;
  color: inherit;
}

.high-contrast #reading-pause[aria-pressed=true] {
  background: #ffdd64;
  color: #000;
}

.high-contrast .reading-phrase {
  background: #fff3a0;
  color: #000;
  box-shadow: none;
}

.high-contrast .reading-word {
  background: #ffdd64;
  color: #000;
  box-shadow: 0 3px 0 #000;
}

/* En las opciones de radio el foco rodea la etiqueta visible. */
.high-contrast .search-box:focus-within {
  outline: none;
}

.high-contrast .product-card:focus-within {
  outline: 4px solid #000;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px #ffdd64;
}

.high-contrast :is(button, a, input, select, textarea, summary):focus-visible,
.high-contrast #speech-toggle:focus-visible,
.high-contrast .radio-chip input:focus-visible + span {
  outline: 4px solid #000;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px #ffdd64;
}

/* Etiquetas del puesto y productos ya mostrados. */
.high-contrast .stall-tag {
  background: #000;
  color: #fff;
  border: 2px solid #000;
}

.high-contrast .stall-tag.is-own {
  background: #fff;
  color: #000;
}

.high-contrast .show-item.is-done {
  background: #eee;
  color: #000;
  text-decoration: line-through;
}

/* Revisión: los enlaces con forma de botón no se subrayan. */
.high-contrast :is(.button, .details-button, .stall-tag, .brand, .bottom-nav a, .detail-tabs a, .card-link) {
  text-decoration: none;
}

/* Modo cocina y lista del puesto. */
.high-contrast :is(.stall-summary, .cook-stall, .cook-step-label, .cook-ingredients li, .cook-ingredients li.is-checked) {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}

.high-contrast .cook-screen {
  padding: 16px;
  margin-bottom: 16px;
}

.high-contrast .cook-done .cook-step-label,
.high-contrast .show-item.is-done .show-check {
  background: #000;
  color: #fff;
}

.high-contrast .cook-progress {
  background: #fff;
  border: 2px solid #000;
}

.high-contrast :is(.show-check, .contrast-switch) {
  border: 2px solid #000;
}

.high-contrast .contrast-switch {
  background: #fff;
}

.high-contrast .contrast-switch::after {
  background: #000;
  box-shadow: none;
}

.high-contrast .contrast-toggle input:checked + .contrast-switch::after {
  background: #ffdd64;
}

.high-contrast :is(.is-checked .cook-check span, .show-item.is-done .show-name, .cook-hint, .show-intro, .cook-wake, .show-types) {
  color: #000;
}

/* Inicio y recetario */
.high-contrast :is(.hero-tagline, .hero-divider) { color: #000; }
.high-contrast .hero-divider :is(.leaf-a, .leaf-b) { fill: #000; }
.high-contrast :is(.recipe-card, .recipe-stall-list a, .recipe-links a, .recipe-product) {
  background: #fff;
  border: 2px solid #000;
  color: #000;
}
.high-contrast :is(.recipe-emoji, .recipe-cover, .recipe-links a > span:first-child, .recipe-facts>span) {
  background: #fff;
  border: 2px solid #000;
}
.high-contrast :is(.recipe-meta, .recipe-count, .recipe-links small, .recipe-card .card-description) { color: #000; }
.high-contrast .recipe-uses { background: #fff; color: #000; border: 2px solid #000; }
.high-contrast :is(.recipe-stall-list svg, .recipe-links svg) { color: #000; }
