/**
 * Concurso / Quiniela — botón en el header + modal.
 * Estética de marca: azul #007FFF, naranja #FF8732, bordes 1px, radios 20/12/8.
 * Todo scopeado bajo .elche-contest-* para no chocar con el tema.
 */
.elche-contest-btn {
  --ec-brand: #007FFF;
  --ec-orange: #FF8732;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 14px/1 inherit;
  color: #fff;
  background: var(--ec-brand);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, transform .1s ease;
}
.elche-contest-btn:hover { background: #005FCC; }
.elche-contest-btn:active { transform: scale(.97); }
.elche-contest-btn--float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99990;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  padding: 12px 18px;
  font-size: 15px;
}
/* Dentro de la barra naranja de sucursal: pill que combina con el chip. */
.elche-contest-btn--bar {
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  letter-spacing: .4px;
}

.elche-contest-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .55);
}
.elche-contest-overlay.is-open { display: flex; }

.elche-contest-modal {
  --ec-brand: #007FFF;
  --ec-brand-dk: #005FCC;
  --ec-orange: #FF8732;
  --ec-light: #E8F2FF;
  --ec-border: #E2E6EC;
  width: 440px;
  max-width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  color: #1d2430;
  border-radius: 20px;
  font-family: inherit;
  -webkit-overflow-scrolling: touch;
}

.elche-contest-head {
  position: relative;
  background: var(--ec-brand);
  color: #fff;
  padding: 16px 18px;
  border-radius: 20px 20px 0 0;
}
.elche-contest-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; line-height: 1.2; }
.elche-contest-head p { margin: 3px 0 0; font-size: 12px; opacity: .9; }
.elche-contest-close {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  /* !important para ganarle a los estilos de <button> del tema (Astra/Bebas
     Neue inyectaba padding:15px 25px + display:block → descentraban la ✕). */
  width: 32px !important;
  height: 32px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 18px;
  line-height: 1 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.elche-contest-body { padding: 16px 18px; }

.elche-contest-instructions {
  background: var(--ec-light);
  border: 1px solid #cfe2ff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #1f3a5f;
  margin-bottom: 12px;
  white-space: pre-line;
}

.elche-contest-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.elche-contest-count {
  font-size: 12px;
  font-weight: 600;
  background: #FFF1E6;
  color: #9a4d11;
  border: 1px solid #ffd9bd;
  border-radius: 8px;
  padding: 4px 10px;
}
.elche-contest-prize {
  font-size: 12px;
  font-weight: 600;
  color: var(--ec-orange);
}

.elche-contest-match {
  border: 1px solid var(--ec-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  /* Fondo sutil para separar cada partido del fondo blanco del modal. */
  background: #f6f8fd;
}
.elche-contest-match__when {
  text-align: center;
  font-size: 11px;
  color: #8a93a3;
  margin-bottom: 8px;
}
.elche-contest-match__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}
.elche-contest-match__teams .vs { font-size: 11px; color: #8a93a3; font-weight: 400; }

.elche-contest-outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.elche-contest-outcome {
  border: 1px solid var(--ec-border);
  background: #fff;
  color: #45506a;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
}
.elche-contest-outcome.is-selected {
  border-color: var(--ec-brand);
  background: var(--ec-light);
  color: var(--ec-brand-dk);
}

/* Pista de selección + tarjeta activa (el partido elegido) */
.elche-contest-pick-hint {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: #45506a;
}
.elche-contest-match.is-active {
  border-color: var(--ec-brand);
  background: #fff;            /* el partido elegido resalta en blanco */
  box-shadow: 0 0 0 2px var(--ec-light);
}

/* Partido en juego: visible pero sin apuestas */
.elche-contest-match.is-closed { opacity: .72; background: #f0f1f4; }

/* Extras opcionales (penal / tarjeta roja) — naranja para diferenciarlos del
   pronóstico principal (azul). Toggles independientes. */
.elche-contest-extras-hint {
  margin: 12px 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #8a93a3;
}
/* Extras como Sí/No (penal, tarjeta roja). */
.elche-contest-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.elche-contest-extra-row > span { font-size: 12px; font-weight: 600; color: #45506a; }
.elche-contest-yn { display: flex; gap: 6px; flex: 0 0 auto; }
.elche-contest-yn-btn {
  border: 1px solid var(--ec-border);
  background: #fff;
  color: #45506a;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}
.elche-contest-yn-btn.is-yes.is-selected { border-color: #1d6b43; background: #e9f7ef; color: #1d6b43; }
.elche-contest-yn-btn.is-no.is-selected { border-color: #a32d2d; background: #fdecec; color: #a32d2d; }

/* Pestañas de partidos (una por partido del día). */
.elche-contest-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.elche-contest-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--ec-border);
  background: #f6f8fd;
  color: #45506a;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}
.elche-contest-tab.is-active { border-color: var(--ec-brand); background: var(--ec-brand); color: #fff; }
.elche-contest-tab.is-closed { opacity: .5; }
.elche-contest-closed {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #9a4d11;
  background: #FFF1E6;
  border: 1px solid #ffd9bd;
  border-radius: 8px;
  padding: 6px 10px;
}

/* 4ª opción: marcador exacto (full width, mismo look que las otras) */
.elche-contest-score-toggle {
  display: block;
  width: 100%;
  border: 1px solid var(--ec-border);
  background: #fff;
  color: #45506a;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
}
.elche-contest-score-toggle.is-selected {
  border-color: var(--ec-brand);
  background: var(--ec-light);
  color: var(--ec-brand-dk);
}

.elche-contest-score {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.elche-contest-score.is-open { display: flex; }
.elche-contest-score span { font-size: 12px; color: #8a93a3; }
.elche-contest-score input {
  width: 48px;
  height: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--ec-border);
  border-radius: 8px;
  -moz-appearance: textfield;
}
.elche-contest-score input::-webkit-outer-spin-button,
.elche-contest-score input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.elche-contest-field {
  width: 100%;
  height: 44px;
  border: 1px solid var(--ec-border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.elche-contest-field:focus { outline: none; border-color: var(--ec-brand); }

.elche-contest-cta {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: var(--ec-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  transition: background .15s ease;
}
.elche-contest-cta:hover { background: var(--ec-brand-dk); }
.elche-contest-cta:disabled { background: #9bbbe0; cursor: not-allowed; }

.elche-contest-note { margin: 8px 0 0; font-size: 11px; color: #8a93a3; text-align: center; }
.elche-contest-alert {
  font-size: 13px;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  display: none;
}
.elche-contest-alert.is-error { display: block; background: #fdecec; color: #a32d2d; border: 1px solid #f5c2c2; }
.elche-contest-alert.is-ok { display: block; background: #e9f7ef; color: #1d6b43; border: 1px solid #bfe6cf; }

.elche-contest-state { text-align: center; padding: 26px 10px; color: #6b7383; font-size: 14px; }
