main{
  max-width: 1600px;
}

#descargaOperaciones  {
  background: var(--bg-gradiente); 
  padding: 30px;
  border-radius: 15px;
  width: 95%;
  max-width: 1600px;
  margin: 40px auto;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  color: var(--texto-principal); 
  box-shadow: var(--sombra-tarjeta); 
}

/* Título */
#descargaOperaciones h2 {
  text-align: center;
  font-size: 2.8em;
  color: var(--alerta-naranja);
  margin-bottom: 20px;
}

/* Intro */
#descargaOperaciones .intro {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 25px;
}
/* 1. CONTENEDOR PRINCIPAL: Aplicamos CSS Grid */
.contenedorCondicionesForm {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  grid-template-rows: auto auto; /* 2 filas */
  gap: 20px; 
  align-items: end;
  
  background-color: var(--bg-input);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--sombra-tarjeta);
  font-family: 'Segoe UI', sans-serif;
  color: var(--texto-principal);
}

/* 2. CAMPOS GENERALES */
.campo {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.campo label {
  margin-bottom: 8px; 
  font-weight: 600;
  color: var(--texto-principal);
}

/* 3. EL INPUT DE LA DERECHA  */
.contenedorCondicionesForm .campo:last-child {
  grid-column: 4; 
  grid-row: 1 / span 2; 
  
  justify-content: center; 
  align-items: center; 
  padding-left: 20px;
  border-left: 2px dashed var(--moneda-oro); 
  height: 100%;
}

/* 4. SELECTS MÁS GRANDES */
.select-wrapper {
  position: relative;
  width: 100%; 
}


.select-wrapper select {
  width: 100%;
  padding: 12px 35px 12px 15px; 
  border: 2px solid var(--moneda-oro);
  border-radius: 12px;
  background-color: var(--bg-input);
  color: var(--texto-principal);
  font-size: 1.1em; 
  min-height: 45px; 
  appearance: none;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.select-wrapper select:focus {
  border-color: var(--color-primario-hover);
  box-shadow: 0 0 8px rgba(97, 184, 255, 0.3); 
  outline: none;
}

.select-wrapper::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--texto-secundario);
  font-size: 0.9em;
}

/* 5. INPUT DE NÚMERO  */
input[type="number"] {
  width: 60px; 
  height: 60px; 
  padding: 5px;
  border: 3px solid var(--alerta-naranja);
  border-radius: 12px;
  font-size: 1.6em;
  font-weight: bold;
  text-align: center;
  transition: transform 0.2s ease;
  background-color: var(--bg-input);
  color: var(--texto-principal);
}

input[type="number"]:focus {
  transform: scale(1.1);
  outline: none;
}


input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#botonesAnadir{
  display:flex;
  justify-content: space-evenly;
}

.inputboton button,
#botonExportar {
  padding: 6px 10px;
  margin: 10px 0;
  font-size: 0.8em;
  font-weight: bold;
  font-family: 'Segoe UI', sans-serif;
  color: var(--texto-blanco); 
  background: var(--alerta-naranja); 
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.inputboton button:hover,
#botonExportar:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  filter: brightness(1.1);
}

.inputboton button:active,
#botonExportar:active {
  transform: scale(0.98);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#botonExportar {
  background: var(--color-primario); 
}

/* Contenedor de descarga con checkbox */
#contenedorDescarga {
  margin-top: 20px;
  padding: 10px;
  background-color: var(--bg-input); 
  border-radius: 10px;
  box-shadow: var(--sombra-tarjeta); 
  font-family: 'Segoe UI', sans-serif;
  font-size: 1em;
  color: var(--texto-principal);
}

#contenedorDescarga label {
  display: inline-block;
  margin-left: 10px;
  font-weight: 500;
  color: var(--texto-principal); 
}
/*Tabla General*/
#headResultado{
  width:200px;
}

#headEliminar{
  width:70px;
}

#tablaOperaciones input{
    background-color: var(--bg-input); 
    color: var(--texto-principal); 
}

#operaciones{
    white-space: nowrap;
    overflow-x: auto;
    font-size: 2vw; 
}

tr td:first-child {
  text-align: left;
  justify-content: left;
}

.contenedorInputEnunciado {
  display: flex;
  justify-content: flex-start; 
}

.contenedorInputEnunciado input {
  text-align: left; 
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  border:none;
  outline: none;
  padding: 4px;
  color: var(--texto-principal); 
  background-color: transparent;
}

td {
  align-items: center;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--texto-principal); 
}

td button{
  align-items: center;        
  justify-content: center;  
  text-align: center;         
  width: 100%;              
  height: 100%;              
  padding: 8px;       
  border: none;
  background: transparent;   
  cursor: pointer;
  color: var(--texto-principal); 
}

/* Botones dentro de la tabla*/
#tablaOperaciones button {
    margin:0;
    width: 35px;
    height: 35px;
    padding: 5px 10px;
    font-size: 1.2em;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Tabla con distribución clara */
#tablaOperaciones {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#tablaOperaciones th,
#tablaOperaciones td {
  text-align: left;
  word-wrap: break-word;
  font-size: 0.95em;
}

#tablaOperaciones th:first-child,
.col-operacion{
  width: 60%;
}



.botonMegusta, .botonNoMegusta {
    transition: all 0.3s ease;
}

.botonMegusta.activo-like i, 
.botonMegusta.activo-like svg,
.botonNoMegusta.activo-dislike i, 
.botonNoMegusta.activo-dislike svg {
    display: none !important;
}

.botonMegusta.activo-like::after {
    content: '💚';
    font-size: 1.4em;
    display: inline-block;
    animation: latido 0.3s ease; /* Pequeño efecto al aparecer */
}

.botonNoMegusta.activo-dislike::after {
    content: '💔';
    font-size: 1.4em;
    display: inline-block;
    animation: latido 0.3s ease;
}

/* Animación opcional para que el emoji salte un poco al hacer clic */
@keyframes latido {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
/* Responsive para móviles */
@media screen and (max-width: 768px) {
  #descargaOperaciones {
    padding: 20px;
  }

  #descargaOperaciones h2 {
    font-size: 2em;
  }

  .inputboton button,
  #botonExportar {
    max-width: 200px;
    width: 100%;
    font-size: 1em;
  }

  #tablaOperaciones tr {
    display: flex;
  }

  #tablaOperaciones tr th:nth-child(1) {
    text-align: center;
  }

  #tablaOperaciones td {
    text-align: center;
    align-items: center;
    border-bottom: 1px solid var(--borde-suave); 
  }

  #tablaOperaciones button {
    font-size: 0.8em;
    padding: 6px 10px;
    margin-top: 5px;
  }
  
  .ocultar-responsive {
    display: none;
  }

  .col-operacion {
    width: 60%;
  }

  .col-resultado {
    width: 40%;
  }

  .col-accion {
    width: auto;
  }

  .ocultar-responsive {
    visibility: hidden;
  }
}