﻿
/* === Stili campi modulo ASP.NET - OBRYD2025_campi.css === */

:root {
  --label-floating-bg: #e9ecef; /* Sfondo uniforme per etichette flottanti */
}

/* Contenitore personalizzato per tutti i campi */
.form-group-custom {
  margin-top: 2rem;
}

/* Input di testo standard */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* Select grande come da Bootstrap */
.form-select.form-select-lg {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 1.25rem;
  border-radius: 0.375rem;
}

/* Etichetta flottante sopra il bordo */
.label-floating {
    position: absolute;
    top: -0.8rem; /* Etichetta più alta */
    left: 1rem;
    background: var(--label-floating-bg);
    border-radius: 10px;
    z-index: 2;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    color: #0D6EFD;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Validatori */
.text-danger {
  color: #dc3545 !important;
}

/* Placeholder per le date */
input[placeholder="gg/mm/aaaa"] {
  font-family: monospace;
}
/* In OBRYD2025_campi.css */
.form-control,
.form-select {
    display: flex;
    align-items: center; /* centra verticalmente */
    padding-top: 0;
    padding-bottom: 0;
    height: calc(2.375rem + 8px); /* altezza uniforme */
}

/* Textarea: rispetta Rows e mostra esattamente ~8 righe */
textarea.form-control {
    display: block !important; /* toglie il flex */
    line-height: 1.5;
    padding-top: .375rem;
    padding-bottom: .375rem;
    height: auto !important;
    /* 8 righe ≈ 8 * line-height + padding: regola se vuoi più/meno */
    min-height: calc(1.5em * 4 + .375rem + .375rem);
    resize: vertical;
}

/* === Checkbox sezione PSI attivi con colore #A5DC37 e glow === */
#chk_psi_gorging:checked,
#chk_psi_binge:checked,
#chk_psi_sweet:checked,
#chk_psi_snacking:checked,
#chk_psi_grazing:checked,
#chk_psi_nocturnal:checked {
    background-color: #A5DC37;
    border-color: #A5DC37;
    accent-color: #A5DC37;
    box-shadow: 0 0 5px rgba(165, 220, 55, 0.6), 0 0 10px rgba(165, 220, 55, 0.4);
    transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

/* === Anteprima glow quando il mouse passa sopra i checkbox PSI === */
#chk_psi_gorging:hover,
#chk_psi_binge:hover,
#chk_psi_sweet:hover,
#chk_psi_snacking:hover,
#chk_psi_grazing:hover,
#chk_psi_nocturnal:hover {
    box-shadow: 0 0 4px rgba(165, 220, 55, 0.5), 0 0 8px rgba(165, 220, 55, 0.3);
    transition: box-shadow 0.2s ease-in-out;
}