/* Sorteos Mensuales - Publico + Admin */

.sorteos-mensuales-section {
  min-height: 100vh;
  position: relative;
  padding: 2rem 0;
  background-color: #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.sorteos-mensuales-section.sorteos-con-fondo {
  background-attachment: fixed;
}

.sorteos-mensuales-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.sorteos-mensuales-section.sorteos-con-fondo::before {
  background: rgba(255, 255, 255, 0.08);
}

.sorteos-mensuales-section .container {
  position: relative;
  z-index: 1;
}

.titulo-seccion-estandar .icono-titulo,
#iconoSorteosVisual.icono-titulo {
  color: #000;
}

.sorteos-mensuales-section,
.sorteos-mensuales-section p,
.sorteos-mensuales-section li,
.sorteos-mensuales-section span,
.sorteos-mensuales-section h2,
.sorteos-mensuales-section h3,
.sorteos-mensuales-section h4,
.sorteos-mensuales-section h5,
.sorteos-mensuales-section h6 {
  color: #000;
}

.icono-titulo-img,
.icono-imagen-personalizada {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

#iconoSorteosVisual {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  overflow: hidden;
}

.section-background-controls {
  position: relative;
  z-index: 2;
}

.background-control-card {
  max-width: 460px;
  margin: 0 1rem 0 auto;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.nueva-categoria-wrap {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 1rem;
}

.btn-nueva-categoria {
  min-width: min(100%, 360px);
}

.btn-agregar-premio {
  border-style: dashed;
}

.admin-sorteos-section .acciones-categoria {
  border-top: 1px dashed #dbe3ef;
  padding-top: 0.65rem;
}

.admin-sorteos-section .btn-eliminar-categoria {
  font-weight: 600;
}

.admin-sorteos-section .btn-anadir-ganador {
  font-weight: 600;
}

.admin-sorteos-section .categoria-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #0c63e3;
}

.admin-sorteos-section .categoria-titulo-input {
  font-weight: 700;
  background: #eef4ff;
  border-color: #bcd2ff;
}

.admin-sorteos-section .premios-subtitulo {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #475569;
}

.admin-sorteos-section .premio-input {
  background: #ffffff;
}

.titulo-contenedor,
.premio-card,
.cronograma-card,
.compra-card,
.sorteo-anterior-card {
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.titulo-contenedor {
  padding: 1.7rem;
}

.premios-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.premio-card {
  padding: 1rem;
}

.premio-titulo {
  color: #000;
  font-weight: 700;
}

.premio-lista {
  list-style: none;
  margin: 0;
  padding: 0;
}

.premio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 1.08rem;
}

.cronograma-card,
.compra-card,
.sorteo-anterior-card {
  padding: 1.25rem;
}

.cronograma-titulo {
  font-weight: 700;
  color: #000;
  text-align: center;
}

.series-container {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.serie-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 0.6rem 0.2rem;
}

.compra-texto {
  font-size: 1.05rem;
  line-height: 1.65;
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.compra-botones {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sorteo-subtitulo {
  margin-bottom: 1rem;
  padding-top: 0.65rem;
  color: #000;
  text-align: center;
}

.serie-resultados {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem;
}

.serie-resultado-titulo,
.numero-ganador {
  color: #000;
}

.ganador-item {
  padding: 0.45rem 0.35rem;
  border-radius: 6px;
}

.ganador-item:hover {
  background: #f8fafc;
}

.sorteo-anterior-card .card-header {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.sorteo-anterior-card .card-header h5.mb-1 {
  color: #fff !important;
}

.sorteos-mensuales-section .titulo-seccion-estandar h3,
.sorteos-mensuales-section .titulo-seccion-estandar h2 {
  color: #000;
}

.seccion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.seccion-header h4 {
  margin: 0;
  color: #1f2937;
  font-weight: 700;
}

/* Admin */

.admin-sorteos-section .editable-text[contenteditable="true"] {
  border-radius: 8px;
  min-height: 28px;
  padding: 0.25rem 0.4rem;
}

.admin-sorteos-section .editable-text[contenteditable="true"]:focus {
  outline: 2px solid rgba(12, 99, 227, 0.22);
  background: #fff;
}

.campo-editable {
  border: 1px solid #d1d5db;
}

.campo-editable:focus {
  border-color: #0c63e3;
  box-shadow: 0 0 0 0.2rem rgba(12, 99, 227, 0.15);
}

.icono-option {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.8rem;
  text-align: center;
}

.icono-option i {
  font-size: 1.6rem;
  color: #0c63e3;
  margin-bottom: 0.35rem;
}

.icono-option:hover {
  border-color: #0c63e3;
}

@media (max-width: 768px) {
  .sorteos-mensuales-section {
    padding: 1rem 0;
  }

  .sorteos-mensuales-section.sorteos-con-fondo {
    background-attachment: scroll;
  }

  .seccion-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .background-control-card {
    margin: 0 0.75rem;
    max-width: none;
  }

  .series-container {
    grid-template-columns: 1fr;
  }

  .titulo-contenedor,
  .premio-card,
  .cronograma-card,
  .compra-card,
  .sorteo-anterior-card {
    border-radius: 12px;
  }
}
