/* ===================== */
/* INGREDIENT ROW */
/* ===================== */

.ingrow-container{
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.ingrow-row{
  display: flex;
  gap: 14px;
  align-items: center;

  width: 100%;
  min-width: 0;     /* fondamentale in flex */
}

/* Stile estetico invariato */
.ingrow-field{
  padding: 14px 18px;
  border-radius: 18px;
  border: none;
  font-size: 15px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(10px);
  outline: none;

  width: 100%;
  min-width: 0;     /* impedisce sforamento */
}

/* Rapporto 1.5 / 0.75 / 0.75 con flex-basis 0 (rispetta davvero i rapporti) */
.ingrow-ingredient{ flex: 1.5 1 0; }
.ingrow-quantity{   flex: 0.75 1 0; text-align: center; }
.ingrow-unit{       flex: 0.75 1 0; text-align: center; }

/* Bottone */
.ingrow-add{
  margin-top: 10px;
  padding: 12px;
  border-radius: 20px;
  border: none;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  transition: transform .2s ease;
}

.ingrow-add:hover{
  transform: scale(1.04);
}

/* Anti-overflow su schermi stretti: va a capo invece di uscire dalla card */
@media (max-width: 520px){
  .ingrow-row{
    flex-wrap: wrap;
  }

  .ingrow-ingredient{
    flex: 1 1 100%;
  }

  .ingrow-quantity,
  .ingrow-unit{
    flex: 1 1 calc(50% - 7px);
  }
}