/* ---------------------- FUENTES ---------------------- */
@import url("https://fonts.googleapis.com/css?family=Roboto+Slab:400,700&display=swap");
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap");

/* ---------------------- BASE ---------------------- */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background-color: #f2f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.container {
  background: #fff;
  max-width: 600px;
  width: 90%;
  border-radius: 12px;
  padding: 30px;
  animation: fadeIn 0.6s ease;
  position: relative;


  /* Nueva sombra más estilizada */
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.12),
    0 4px 6px rgba(0, 0, 0, 0.08);
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.volver-button {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 14px;
  font-weight: 600;
  color: #0077b6;
  background-color: #e3f2fd;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}


.volver-button:hover {
  background-color: #bbdefb;
}


/* ---------------------- HEADER ---------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  gap: 20px;
}

.header-image {
  max-width: 130px;
  height: auto;
  align-items: center;
}

h1 {
  font-family: 'Roboto Slab', serif;
  font-size: 24px; 
  color: black;
  margin: 0;
  text-align: center;
}

.title-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-title {
  font-family: 'Roboto Slab', serif;
  font-size: 26px;
  color: black;
  margin: 0;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}


/* ---------------------- SELECTOR DE PRODUCTO ---------------------- */
.selector-label {
  display: block;
  text-align: center;
  font-weight: 500;
  font-size: 17px;
  color: #0077b6; /* combina con el estilo del tab */
  margin: 16px 0 16px; /* más espacio arriba y abajo */
  letter-spacing: 0.5px;
}


/* ---------------------- TABS ---------------------- */
.tabs {
  display: flex;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
}

.tablink {
  flex: 1;
  height: 48px; /* ⬅️ Altura clara y consistente */
  line-height: 48px; /* ⬅️ Centrado vertical del texto */
  background-color: #0facee;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}


.tablink:hover {
  background-color: #81d4fa;       /* Hover más suave */
  color: #004b80;                  /* Texto azul más fuerte */
}


.tablink.active {
  background-color: #1976d2;       /* Azul Francia */
  color: white;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* ---------------------- FRASE PASO 2 ---------------------- */

.paso-label {
  font-weight: 500;
  font-size: 17px;
  color: #0077b6;
  margin: 40px 0 20px;
  text-align: left;
  width: 100%;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

/* ---------------------- FORMULARIO ---------------------- */
.formulario {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  
}


/* Input válido sin foco */
.input-valido:not(.en-foco) {
  border: 2px solid #0077b6 !important;
  box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.25) !important;
}

/* Input inválido */
.input-invalido {
  border: 2px solid #c0392b !important;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.3) !important;
}



/* Input válido con foco */
.input-valido.en-foco {
  border: 2px solid #00ced1 !important;
  box-shadow: 0 0 0 2px rgba(0, 206, 209, 0.4) !important;
}




.input-group {
  display: flex;
  flex-direction: column;
  align-items: center; /* ⬅️ centra input y texto debajo */
  width: 100%;
  max-width: 300px;
}


.input-group label {
  font-weight: 600;
  margin-bottom: 6px;
  align-self: flex-start; /* ⬅️ fuerza que el label quede a la izquierda */
  text-align: left;
}


.input-group input {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  text-align: center; /* ⬅️ Centra el número dentro del input */
  border: 1px solid #ccc;
  box-shadow: none;
}


.input-group .unidad {
  font-size: 14px;
  margin-top: 4px;
  color: #666;
  min-height: 14px;
  text-align: center;
  width: 100%;           /* ⬅️ esto asegura que ocupe todo el ancho */
}



/* ---------------------- CILINDRO ---------------------- */
.cilindrica-group {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cilindrica-group.show {
  opacity: 1;
  pointer-events: auto;
}

/* ---------------------- RESULTADO ---------------------- */
#result {
  font-size: 18px;
  font-weight: bold;
  padding: 12px;
  background: linear-gradient(to right, #e0f7fa, #ffffff);
  border: 1px solid #0facee;
  border-radius: 8px;
  color: #0077b6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-top: 10px;
  min-height: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}

#result:hover {
  transform: scale(1.15);
}



/* ---------------------- FRASQUITO ---------------------- */
.tabs-wrapper {
  position: relative;
  height: 120px; /* más alto para dar lugar al frasco */
  margin-bottom: -40px;
}


.frasco-wrapper {
  position: absolute;
  bottom: -10px;
  left: 0;
  transform: translateX(0); /* se actualiza dinámicamente desde JS */
  height: 100px;
   transition: opacity 0.3s ease, transform 0.4s ease;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.frasco-wrapper.encajado {
  opacity: 1;
  transform: translateY(0);
}


#frasco {
  height: 100px; /* antes 90px */
  transition: transform 0.4s ease;
}


.frasco-wrapper.shrink #frasco {
  transform: scale(0.85);
}


.frasco-wrapper.encajado #frasco {
  transform: scale(1.1); /* agrandado en vez de achicar */
}

.frasco-wrapper.oculto {
  opacity: 0;
  pointer-events: none;
}

/*-------------------------BOTON LIMPIAR -------------------------- */

.limpiar-btn {
  background-color: #0077b6;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 15px;
  font-weight: 600;
}
.limpiar-btn:hover {
  background-color: #005a8a;
}

/*------------------------------- RESPONSIVE --------------------------*/

@media screen and (max-width: 600px) {
  body {
    padding: 0;
    display: block;
  }

    .imagen-derecha {
    display: none;
  }

  .container {
    padding: 20px 15px;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    margin: 0 auto;
  }

  .header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
  }

.header-image {
  max-width: 60px;
  height: auto;
}
.header-title {
  font-size: 20px;
  line-height: 1.2;
}

  .volver-button {
    position: relative;
    margin-bottom: 10px;
    display: inline-block;
  }

  .tabs {
    flex-direction: column;
    gap: 5px;
  }

.tablink {
  padding: 8px 10px;
  font-size: 14px;
  height: auto;
  line-height: normal;
  border-radius: 6px;
}

  .frasco-wrapper {
    display: none; /* Ocultar frasco en pantallas chicas */
  }

.paso-label {
  font-size: 15px;
  text-align: center;
  padding: 0 10px;
  margin-top: 90px;
  margin-bottom: 10px;
  word-wrap: break-word;
  white-space: normal;
  width: 100%;
  display: block;
}



  .input-group {
    width: 100%;
    max-width: 100%;
  }

  .formulario {
    gap: 18px;
    padding: 0 10px;
  }

  #result {
    font-size: 18px;
    margin-top: 10px;
  }
}
