/* FUENTE PERSONALIZADA */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
}

/* ESTILO GENERAL */
body {
  background-color: rgba(158, 180, 255, 1);
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
  padding-bottom: 8rem;
}

h2 {
  font-size: 2rem;
  text-shadow: 0px 2px 3px white;
  text-align: center;
  padding-top: 1rem;
}

h4 {
  font-size: 1.25rem;
  text-align: center;
}

/* PLACEHOLDER */
input[type="text"]::placeholder {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.4);
}

/* ETIQUETAS SOLO PARA LECTORES DE PANTALLA */
.solo-lp {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* CONTENEDOR DE INPUT + BOTÓN */
.contenedor-pestana {
  position: relative;
  display: flex;
  width: 90vw;
  max-width: 500px;
  margin: 0.75rem auto;
}

/* FORMA DE LOS RECUADROS DE PARTICIPANTES  (pestaña) */
.pestana {
  display: block;
  width: 100%;
  padding-right: 2.5rem;
  border: 2px solid black;
  border-radius: 8px;
  padding: 0.5em;
  font-family: 'JetBrains Mono', monospace;
  font-weight: bold;
  font-size: 1.2rem;
  background-color: white;
  line-height: 1.5;
  overflow-wrap: anywhere;
  margin: 0;
  height: auto;
}

.sombra-interior {
  box-shadow: inset 2px 2px 2px rgba(0, 0, 0, 0.5);
}

.sombra-exterior {
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

.btn-icono:hover,
.btn-opcion:hover,
.btn-menu:hover {
  scale: 1.1;
  transition-duration: 100ms;
}

/* ICONO DE BOTÓN */
.btn-icono img {
  width: 2.3rem;
  height: 2.3rem;
  display: block;
}

/* LISTA DE PARTICIPANTES */
#listaParticipantes {
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

.btn-opcion {
  margin: 0 auto;
  width: 50%;
  height: auto;
  margin-bottom: 2rem;
}

.btn-ir-gastos,
.btn-volver {
  background-color: rgb(255, 200, 0);
}

.btn-eliminar {
  background-color: rgb(200, 0, 0);
  color: white;
  text-shadow: 1px 1px 0.5px black, 0px 0px 3px black;
}

.btn-cancelar {
  background-color: rgb(200, 200, 200);
  color: rgb(0, 0, 0);
}

.btn-anadir-gasto {
  background-color: rgb(0, 150, 0);
  color: white;
  text-align: center;
  text-shadow: 1px 1px 0.5px black, 0px 0px 3px black;
}

.btn-exportar {
  background-color: rgb(0, 150, 0);
  color: white;
  text-align: center;
  text-shadow: 1px 1px 0.5px black, 0px 0px 3px black;
}

.alerta-tiene-gastos {
  background-color: rgb(200, 0, 0);
  color: white;
  text-align: center;
  text-shadow: 1px 1px 0.5px black, 0px 0px 3px black;
  width: 75%;
  padding: 1rem;
  margin: 0 auto;
  border-radius: 8px;
  border: 2px solid black;
  margin-bottom: 2rem;
}

.menu-inferior {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgb(0, 0, 80);
  border-top: 2px white;
  border-top-style: inset;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -3px 20px rgba(0, 0, 80, 1);
  z-index: 1000;
}

.btn-icono {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  filter: drop-shadow(-1px 2px 1px rgba(0, 0, 0, 0.4));
}

.btn-menu {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-menu img {
  width: 3rem;
  height: 3rem;
}

.btn-menu:not(.activo) img {
  width: 2rem;
  height: 2rem;
}

.activo img {
  filter: drop-shadow(-1px 1px 1px rgb(255, 200, 0));
}

.espacio-inferior {
  margin-bottom: 10rem;
}

.label-gasto {
  display: block;
  margin-left: 5%;
  font-weight: bold;
  margin-top: 0.5rem;
}

.select-pagador {
  width: 90%;
}

.oculto {
  display: none;
}

/* ===== MENSAJES DE ERROR ===== */
.mensaje-error {
  color: rgb(150, 0, 0);
  font-weight: bold;
  text-align: center;
  font-size: 0.9rem;
  margin: 0.25rem auto 1rem auto;
  min-height: 1rem;
}

/* ===== NOMBRE DEL PARTICIPANTE EN AVISOS ===== */
.nombre-participante-aviso {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin: 0.5rem 0;
}

/* ===== SWITCH MODO AVANZADO ===== */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.switch-container .label-gasto {
  margin: 0;
}

#toggleAvanzado {
  width: 1.5rem;
  height: 1.5rem;
  cursor: pointer;
}

/* ===== TABLA AVANZADA DE DISFRUTES ===== */
#tablaAvanzado {
  width: 90vw;
  max-width: 500px;
  margin: 0 auto;
}

.fila-encabezado,
.fila-disfrute {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.fila-encabezado {
  font-weight: bold;
  border-bottom: 2px solid black;
  margin-bottom: 0.5rem;
}

.col-participante {
  flex: 1;
  font-weight: bold;
  overflow-wrap: anywhere;
  padding-right: 0.5rem;
}

.col-disfrute {
  flex: 1.5;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.col-valor input {
  width: 6rem;
  border: 2px solid black;
  border-radius: 8px;
  padding: 0.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  box-shadow: inset 2px 2px 2px rgba(0, 0, 0, 0.5);
}

.col-tipo select {
  border: 2px solid black;
  border-radius: 8px;
  padding: 0.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

/* ===== TABLA DE GASTOS ===== */
#tablaGastos,
#tablaResumenCuentas {
  width: 90vw;
  max-width: 500px;
  margin: 1rem auto;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

#tablaGastos th,
#tablaGastos td,
#tablaResumenCuentas th,
#tablaResumenCuentas td {
  border: 1px solid black;
  padding: 0.4rem;
  text-align: center;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

#tablaGastos th,
#tablaResumenCuentas th {
  background-color: rgb(0, 0, 80);
  color: white;
}

.btn-accion {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.3rem 0.5rem;
  border: 2px solid black;
  border-radius: 8px;
  cursor: pointer;
  background-color: rgb(200, 200, 200);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-accion:hover {
  scale: 1.05;
  transition-duration: 100ms;
}

.btnEditar {
  background-color: rgb(255, 200, 0);
}

.btnEliminarGasto {
  background-color: rgb(200, 0, 0);
  color: white;
}

/* ===== DETALLE DE GASTOS EN RESUMEN ===== */
#detalleGastos {
  width: 90vw;
  max-width: 500px;
  margin: 0 auto;
}

.detalle-gasto {
  background-color: white;
  border: 2px solid black;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.detalle-gasto p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.detalle-gasto .concepto {
  font-weight: bold;
  font-size: 1rem;
}

.detalle-gasto ul {
  margin: 0.25rem 0 0 1.5rem;
  padding: 0;
  font-size: 0.85rem;
}

/* ===== PAGOS RECOMENDADOS ===== */
#pagosRecomendados {
  width: 90vw;
  max-width: 500px;
  margin: 0 auto;
}

.pago-recomendado {
  background-color: rgb(255, 200, 0);
  border: 2px solid black;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  font-weight: bold;
  text-align: center;
}

.pago-recomendado .cantidad {
  font-size: 1.2rem;
}

/* ===== SECCIONES ===== */
section {
  display: none;
  padding-bottom: 2rem;
}

section.visible {
  display: block;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  body {
    padding-bottom: 6rem;
  }

  .contenedor-pestana,
  #tablaAvanzado,
  #tablaGastos,
  #tablaResumenCuentas,
  #detalleGastos,
  #pagosRecomendados {
    max-width: 700px;
  }

  .fila-disfrute {
    justify-content: space-around;
  }

  .col-valor input {
    width: 8rem;
  }
}