/* Gr.Est. iscrizione pubblica - stile esterno dedicato
   Percorso consigliato: /centro/css/grest_iscrizione_pubblica.css */

:root {
  --grest-bg: #f5f8fb;
  --grest-card: #ffffff;
  --grest-card-soft: #fbfdff;
  --grest-text: #143349;
  --grest-muted: #5a7287;
  --grest-border: #dce7f0;
  --grest-border-strong: #cbddeb;
  --grest-primary: #2668a8;
  --grest-primary-dark: #174b80;
  --grest-primary-soft: #eaf4ff;
  --grest-summer: #f4b83f;
  --grest-field-bg: #fff8d8;
  --grest-field-bg-focus: #fff4bd;
  --grest-field-disabled: #f4eed0;
  --grest-green: #21a66b;
  --grest-violet: #6a1b75;
  --grest-danger-bg: #fff3f3;
  --grest-danger-border: #f1b8b8;
  --grest-danger-text: #9e1f1f;
  --grest-success-bg: #eefaf1;
  --grest-success-border: #b9e3c2;
  --grest-success-text: #146c2e;
  --grest-radius: 18px;
  --grest-radius-sm: 14px;
  --grest-shadow: 0 16px 38px rgba(20, 51, 73, .08);
  --grest-shadow-strong: 0 18px 40px rgba(31, 59, 96, .18);
}

.grestBody {
  background:
    radial-gradient(circle at top left, rgba(244, 184, 63, .16), transparent 32rem),
    radial-gradient(circle at top right, rgba(38, 104, 168, .14), transparent 30rem),
    var(--grest-bg);
}

.grestWrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.grestHero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--grest-violet) 0%, var(--grest-primary) 58%, #19a978 100%);
  color: #fff;
  border-radius: var(--grest-radius);
  padding: 24px 20px;
  margin: 0 0 18px;
  box-shadow: var(--grest-shadow-strong);
}

.grestHero::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(244, 184, 63, .35);
}

.grestHero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: -.02em;
}

.grestHero p {
  position: relative;
  z-index: 1;
  margin: 0;
  line-height: 1.55;
  opacity: .96;
}

.grestGrid,
.formRow,
.formRow3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.grestPanel {
  background: var(--grest-card);
  border: 1px solid var(--grest-border);
  border-radius: var(--grest-radius);
  padding: 18px;
  box-shadow: var(--grest-shadow);
}

.grestPanel h2 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--grest-text);
}

.grestList {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.grestList li {
  background: linear-gradient(135deg, #f6f9fc 0%, #fffaf0 100%);
  border: 1px solid #e4edf4;
  border-left: 5px solid var(--grest-summer);
  border-radius: var(--grest-radius-sm);
  padding: 11px 13px;
  color: #23435a;
  line-height: 1.5;
}

.grestList b,
.grestSubtitle,
.grestField > label,
.form-floating > label {
  color: var(--grest-text);
  font-weight: 900;
}

.grestBox {
  border: 1px solid var(--grest-border);
  padding: 14px;
  border-radius: var(--grest-radius-sm);
  background: var(--grest-card-soft);
}

.grestSubtitle {
  font-size: .98rem;
  margin-bottom: 12px;
}

.grestHelp,
.formulaHelp,
.grestFooter {
  color: var(--grest-muted);
  line-height: 1.45;
}

.grestHelp {
  font-size: .9rem;
  margin-top: 2px;
}

.formulaHelp,
.grestFooter {
  font-size: .86rem;
}

.grestMsg {
  display: none;
  margin-bottom: 12px;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
}

.grestMsg.is-visible {
  display: block;
}

.grestMsg.error {
  background: var(--grest-danger-bg);
  border: 1px solid var(--grest-danger-border);
  color: var(--grest-danger-text);
}

.grestMsg.success {
  background: var(--grest-success-bg);
  border: 1px solid var(--grest-success-border);
  color: var(--grest-success-text);
}

.grestRequired {
  color: #cf1f1f;
  font-weight: 900;
}

/* Override Bootstrap floating labels: label sopra, campo sotto */
.grestPublic .form-floating {
  display: flex;
  flex-direction: column-reverse;
  gap: 7px;
  min-height: 0;
}

.grestPublic .form-floating > label {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: 1.35;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.grestPublic .form-floating > .form-control,
.grestPublic .form-floating > .form-select,
.grestPublic .form-floating > .fldAR {
  height: 54px;
  min-height: 54px;
  padding: 12px 14px;
}

.grestPublic .form-floating > textarea.fldAR,
.grestPublic textarea.grestTextarea {
  height: auto;
  min-height: 110px;
  resize: vertical;
  padding-top: 12px;
}

.grestPublic .fldAR,
.grestPublic .form-select,
.grestPublic .formulaSelect {
  width: 100%;
  border: 1px solid var(--grest-border-strong);
  border-radius: 12px;
  background-color: var(--grest-field-bg);
  color: var(--grest-text);
  font-size: 1rem;
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.grestPublic .fldAR:focus,
.grestPublic .form-select:focus,
.grestPublic .formulaSelect:focus {
  border-color: var(--grest-primary);
  background-color: var(--grest-field-bg-focus);
  box-shadow: 0 0 0 .18rem rgba(38, 104, 168, .16);
  outline: none;
}

.grestPublic select.form-select,
.grestPublic .formulaSelect {
  min-height: 54px;
  padding: 12px 14px;
}

.grestPublic .select2-container {
  width: 100% !important;
}

.grestPublic .select2-container--bootstrap4 .select2-selection {
  min-height: 54px !important;
  border: 1px solid var(--grest-border-strong);
  border-radius: 12px;
  background-color: var(--grest-field-bg) !important;
  display: flex;
  align-items: center;
}

.grestPublic .select2-container--bootstrap4.select2-container--focus .select2-selection,
.grestPublic .select2-container--bootstrap4.select2-container--open .select2-selection {
  border-color: var(--grest-primary);
  background-color: var(--grest-field-bg-focus) !important;
  box-shadow: 0 0 0 .18rem rgba(38, 104, 168, .16);
}

.grestPublic .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
  background-color: #fff;
  border-color: #eadb90;
  color: var(--grest-text);
}

.grestPublic .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
  line-height: 52px !important;
  color: var(--grest-text);
  padding-left: 14px;
}

.grestPublic .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
  height: 52px !important;
}

.weekGrid {
  display: grid;
  gap: 10px;
}

.weekCard {
  display: grid;
  gap: 10px;
  border: 1px solid #d9e7f4;
  border-radius: var(--grest-radius-sm);
  background: #fff;
  padding: 12px;
}

.weekHead {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.weekHead input,
.grestCheck input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--grest-primary);
}

.weekTitle {
  font-weight: 900;
  color: #163a58;
}

.weekMeta {
  font-size: .92rem;
  color: #4f667c;
  line-height: 1.45;
}

.grestPublic .fldAR:disabled,
.grestPublic .form-select:disabled,
.grestPublic .formulaSelect:disabled {
  background-color: var(--grest-field-disabled);
  color: #7b7356;
}

.formulaSelect:disabled {
  background: var(--grest-field-disabled);
  color: #7b7356;
}

.grestCheck {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  color: #23435a;
  line-height: 1.45;
}

.grestMiniLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  text-decoration: none;
  border: 1px solid var(--grest-success-border);
  background: #fff;
  color: var(--grest-success-text);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 900;
}

.grestActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.grestBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.grestBtn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.grestBtnPrimary {
  color: #fff;
  background: linear-gradient(135deg, var(--grest-primary) 0%, var(--grest-green) 100%);
  box-shadow: 0 12px 24px rgba(38, 104, 168, .24);
}

.grestBtnPrimary:hover,
.grestBtnPrimary:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--grest-primary-dark) 0%, #16895b 100%);
}

.grestBtnGhost {
  color: var(--grest-primary-dark);
  background: var(--grest-primary-soft);
  border-color: #c7def3;
}

.grestBtnGhost:hover,
.grestBtnGhost:focus {
  color: var(--grest-primary-dark);
  background: #dff0ff;
}

@media (max-width: 920px) {
  .grestWrap {
    padding: 14px 10px 36px;
  }

  .grestPanel,
  .grestHero {
    border-radius: 16px;
    padding: 16px;
  }

  .grestActions {
    flex-direction: column;
  }

  .grestBtn {
    width: 100%;
  }
}


/* Feedback vicino al pulsante di conferma: evita che su mobile l'errore resti fuori schermo */
.grestActionFeedback {
  display: none;
  margin: 16px 0 10px;
}

.grestActionFeedback.is-visible {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.grestActionFeedback i {
  margin-top: 2px;
  flex: 0 0 auto;
}

.grestActionFeedback span {
  display: block;
}

/* Pulsante conferma più sobrio, coerente con il tasto Home */
.grestBtnPrimary {
  color: var(--grest-primary-dark);
  background: #ffffff;
  border-color: #bdd6ee;
  box-shadow: 0 8px 18px rgba(20, 51, 73, .08);
}

.grestBtnPrimary:hover,
.grestBtnPrimary:focus {
  color: var(--grest-primary-dark);
  background: var(--grest-primary-soft);
  border-color: #9fc3e5;
  box-shadow: 0 10px 22px rgba(20, 51, 73, .12);
}

.grestBtnPrimary:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(20, 51, 73, .10);
}

@media (max-width: 920px) {
  .grestActionFeedback {
    position: sticky;
    bottom: 10px;
    z-index: 20;
    box-shadow: 0 14px 30px rgba(20, 51, 73, .18);
  }
}


/* ==========================================================
   Gr.Est. iscrizione pubblica – variante pastello elegante
   Aggiornamento 2026-05-02
   ========================================================== */
:root{
  --grest-bg:#fbfaf7;
  --grest-card:#ffffff;
  --grest-card-soft:#fffdf8;
  --grest-text:#203847;
  --grest-muted:#607383;
  --grest-border:#e7dfd3;
  --grest-border-strong:#d9d0c2;
  --grest-primary:#4f86b8;
  --grest-primary-dark:#315f88;
  --grest-primary-soft:#eaf4ff;
  --grest-summer:#e8b85d;
  --grest-field-bg:#fff9dd;
  --grest-field-bg-focus:#fff4bd;
  --grest-green:#5fae8d;
  --grest-violet:#7161a8;
  --grest-shadow:0 16px 36px rgba(47,64,80,.09);
  --grest-shadow-strong:0 18px 42px rgba(47,64,80,.14);
}
.grestBody{
  background:
    radial-gradient(circle at top left, rgba(127,200,169,.28), transparent 32rem),
    radial-gradient(circle at top right, rgba(217,207,248,.32), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(255,217,188,.28), transparent 28rem),
    linear-gradient(180deg, #fffaf0 0%, var(--grest-bg) 48%, #f4fbff 100%);
}
.grestHero{
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(255,255,255,.28), transparent 62%),
    linear-gradient(135deg, #7161a8 0%, #4f86b8 54%, #5fae8d 100%);
  box-shadow:var(--grest-shadow-strong);
}
.grestHero::after{ background:rgba(255,240,184,.42); }
.grestPanel{
  border-color:var(--grest-border);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,253,248,.90));
}
.grestList li,
.weekCard{
  background:linear-gradient(135deg, #ffffff 0%, #fff7ec 100%);
  border-color:var(--grest-border);
}
.grestBtnPrimary{
  color:var(--grest-primary-dark);
  background:#ffffff;
  border-color:#bdd6ee;
  box-shadow:0 8px 18px rgba(47,64,80,.08);
}
.grestBtnPrimary:hover,
.grestBtnPrimary:focus{
  color:var(--grest-primary-dark);
  background:var(--grest-primary-soft);
  border-color:#9fc3e5;
}
.weekHead input,
.grestCheck input{ accent-color:var(--grest-green); }

/* ==========================================================
   Gr.Est. iscrizione pubblica – colori pastello più evidenti
   Aggiornamento 2026-05-02 b
   ========================================================== */
:root{
  --grest-bg:#fbfaf7;
  --grest-card:#ffffff;
  --grest-card-soft:#fffaf0;
  --grest-text:#183345;
  --grest-muted:#526b7f;
  --grest-border:#ddd0bf;
  --grest-border-strong:#c9b9a5;
  --grest-primary:#367cbd;
  --grest-primary-dark:#245d90;
  --grest-primary-soft:#dcefff;
  --grest-summer:#e8ad3f;
  --grest-field-bg:#fff4bd;
  --grest-field-bg-focus:#ffe98b;
  --grest-field-disabled:#efe3b6;
  --grest-green:#43a77b;
  --grest-violet:#6652aa;
  --grest-shadow:0 17px 38px rgba(47,64,80,.12);
  --grest-shadow-strong:0 20px 48px rgba(47,64,80,.18);
}

.grestBody{
  background:
    radial-gradient(circle at top left, rgba(87,185,145,.40), transparent 32rem),
    radial-gradient(circle at top right, rgba(180,162,238,.44), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(255,188,139,.42), transparent 28rem),
    linear-gradient(180deg, #fff6df 0%, var(--grest-bg) 48%, #edf8ff 100%);
}

.grestHero{
  background:
    radial-gradient(210px 140px at 100% 0%, rgba(255,255,255,.32), transparent 62%),
    radial-gradient(180px 130px at 0% 100%, rgba(255,218,124,.28), transparent 65%),
    linear-gradient(135deg, #6652aa 0%, #367cbd 54%, #43a77b 100%);
  box-shadow:var(--grest-shadow-strong);
}
.grestHero::after{ background:rgba(255,218,124,.55); }

.grestPanel{
  border-color:var(--grest-border);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,250,240,.94));
  box-shadow:var(--grest-shadow);
}
.grestPanel h2{ color:var(--grest-text); }

.grestList li,
.weekCard,
.grestBox{
  background:linear-gradient(135deg, #ffffff 0%, #fff3df 100%);
  border-color:var(--grest-border);
}
.grestList li{ border-left-color:var(--grest-summer); }
.weekCard:hover,
.grestBox:hover{
  border-color:#bda98d;
}

.grestPublic .fldAR,
.grestPublic .form-select,
.grestPublic .formulaSelect,
.grestPublic .select2-container--bootstrap4 .select2-selection{
  border-color:var(--grest-border-strong);
  background-color:var(--grest-field-bg) !important;
}
.grestPublic .fldAR:focus,
.grestPublic .form-select:focus,
.grestPublic .formulaSelect:focus,
.grestPublic .select2-container--bootstrap4.select2-container--focus .select2-selection,
.grestPublic .select2-container--bootstrap4.select2-container--open .select2-selection{
  border-color:var(--grest-primary);
  background-color:var(--grest-field-bg-focus) !important;
  box-shadow:0 0 0 .20rem rgba(54,124,189,.24);
}

.grestBtnPrimary{
  color:#fff;
  background:linear-gradient(135deg, var(--grest-primary) 0%, var(--grest-green) 100%);
  border-color:rgba(36,93,144,.32);
  box-shadow:0 12px 25px rgba(54,124,189,.28);
}
.grestBtnPrimary:hover,
.grestBtnPrimary:focus{
  color:#fff;
  background:linear-gradient(135deg, var(--grest-primary-dark) 0%, #318a63 100%);
  border-color:rgba(36,93,144,.46);
}
.grestBtnGhost{
  color:var(--grest-primary-dark);
  background:var(--grest-primary-soft);
  border-color:#a9ccea;
}
.grestBtnGhost:hover,
.grestBtnGhost:focus{
  background:#cce8ff;
  border-color:#83b7e4;
}

.weekHead input,
.grestCheck input{ accent-color:var(--grest-green); }
.grestActionFeedback{ border-color:rgba(54,124,189,.32); }
.grestMsg.success{ background:#e3f7ea; border-color:#8fd9a4; color:#10672b; }
.grestMsg.error{ background:#fff0f0; border-color:#e58b8b; color:#8f1d1d; }

/* Segnalazioni sanitarie guidate Sì/No */
.grestHealthQuestion{
  display:grid;
  gap:10px;
  border:1px solid var(--grest-border);
  border-radius:var(--grest-radius-sm);
  background:rgba(255,255,255,.72);
  padding:12px;
}
.grestHealthTitle{
  color:var(--grest-text);
  font-weight:900;
  line-height:1.35;
}
.grestHealthOptions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.grestHealthOption{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:92px;
  padding:10px 12px;
  border:1px solid var(--grest-border-strong);
  border-radius:12px;
  background:#fff;
  color:var(--grest-text);
  font-weight:900;
  cursor:pointer;
}
.grestHealthOption input{
  width:18px;
  height:18px;
  accent-color:var(--grest-green);
}
.grestHealthDetail{
  display:none;
  margin-top:2px;
}
.grestHealthDetail.is-visible{
  display:flex;
}
