/* GIV — Completamento della grafica: attività del Presidente (25/10/2026).
   «Nuovo servizio» con la scelta Turno · Servizio · Intervento, righe dei servizi a elenco con icona,
   Turni giornalieri, Interventi spot, Servizi pianificati, striscia dei giorni dell'Agenda.
   Colori, schede, righe e icone dalla base comune (public/giv-theme.css); gruppi dei moduli, «−/+»,
   barra delle azioni e ricerca riusano le classi della fase 2 (gp-form-group, gp-stepper, gp-actions,
   gp-search, gp-segmented in public/giv-presidente.css). Nessun testo sotto i 14 px.
   Le griglie della settimana e del mese (.weekgrid, .monthgrid, .week-time…) non sono toccate (§6.2). */

/* ---------- Nuovo servizio: scelta del tipo ---------- */
#dialog .ga-segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin:14px 0 4px;padding:3px;border:0;border-radius:12px;background:var(--giv-card-2)}
html #dialog .ga-segmented button{min-height:var(--giv-touch);margin:0;padding:0 6px;border:0;border-radius:9px;background:transparent;box-shadow:none;color:var(--giv-ink);font-size:var(--giv-text-base);font-weight:500}
html #dialog .ga-segmented button.active{background:var(--giv-card);color:var(--giv-ink);font-weight:600;box-shadow:0 1px 3px rgba(16,24,40,.14)}
html[data-theme="dark"] #dialog .ga-segmented{background:var(--giv-card-2)!important}
html[data-theme="dark"] #dialog .ga-segmented button{background:transparent!important;color:var(--giv-ink)!important;border:0!important}
html[data-theme="dark"] #dialog .ga-segmented button.active{background:#3A3A3C!important}
#dialog .ga-segmented button:focus-visible{outline:3px solid var(--giv-focus);outline-offset:1px}
#dialog .ga-kind-title{margin:16px 0 0;font-size:var(--giv-text-base);font-weight:700;color:var(--giv-ink)}
#dialog .ga-unified > h2:first-child{margin-bottom:0}
#dialog .ga-group[hidden]{display:none!important}
#dialog .ga-group > p.meta,#dialog .ga-group .meta{font-size:var(--giv-text-min)}
#dialog .ga-group > details.giv-details{grid-column:1 / -1;margin:0}
#dialog .ga-group .gp-stepper-row .gp-stepper{margin-top:6px}
#dialog .ga-form-label + .ga-group{margin-top:0}
/* Disponibilità della settimana: giorni, mese e riepilogo a 14 px (prima 11–13 px; non è una delle cinque griglie del calendario). */
#dialog .weekly-day-name,#dialog .weekly-day-month,#dialog .weekly-days-summary{font-size:var(--giv-text-min)}
/* La nota «Dopo la creazione…» e le note dei moduli restano leggibili. */
#dialog #spot-crew-suggestion .notice small,#dialog #spot-crew-suggestion .notice b{font-size:var(--giv-text-min)}

/* ---------- Conferma «creato» ---------- */
.ga-done{display:flex;flex-direction:column;align-items:center;gap:6px;margin:8px 0 14px;padding:22px 18px;text-align:center;background:var(--giv-card);border:1px solid var(--giv-border);border-radius:var(--giv-radius);box-shadow:var(--giv-shadow);color:var(--giv-ink)}
.ga-done h2{margin:8px 0 0;font-size:22px;color:var(--giv-ink)}
.ga-done p{margin:0;font-size:var(--giv-text-base);color:var(--giv-ink-2)}
.ga-done p b{color:var(--giv-ink)}

/* ---------- Turni giornalieri, Interventi spot, Servizi pianificati ---------- */
#content .ga-section .gp-search{margin-top:4px}
#content .ga-count{margin:12px 4px 0;font-size:var(--giv-text-min)}
#content .ga-links{margin-top:14px}
#content .ga-link-row{min-height:56px;font-weight:600;cursor:pointer}
#content .ga-note{margin:10px 4px 0;font-size:var(--giv-text-min);line-height:1.45;color:var(--giv-ink-2)}
#content .ga-note b{color:var(--giv-ink)}
#content .ga-section .card.empty{margin-top:14px}
/* Avvisi in cima alle pagine (per esempio «Un intervento spot è ancora aperto»): testo ≥ 14 px. */
#content > .notice small,#content > .notice b{font-size:var(--giv-text-min)}
#content .ga-section .card.empty p,#content .ga-section .card.empty h3{font-size:var(--giv-text-base)}

/* ---------- Righe dei servizi (anche nell'Agenda) ---------- */
html #content [data-ga-list],html #dialog .grid:has(> .ga-service){display:grid;gap:0;margin-top:12px;padding:0;background:var(--giv-card);border:1px solid var(--giv-border);border-radius:var(--giv-radius);box-shadow:var(--giv-shadow);overflow:hidden}
html[data-theme="dark"] #content [data-ga-list]{background:var(--giv-card)!important;border-color:var(--giv-border)!important}
.ga-service{position:relative;display:flex;flex-direction:column;margin:0;min-width:0;background:transparent}
.ga-service + .ga-service::before,.president-week-group + .ga-service::before,.ga-service + .president-week-group::before{content:"";position:absolute;top:0;left:70px;right:0;height:1px;background:var(--giv-separator)}
html .ga-service .ga-service-main{align-items:center;min-height:60px;margin:0;padding:10px 16px;border:0;border-radius:0;box-shadow:none;background:transparent;font-weight:400;cursor:pointer}
.ga-service .ga-service-main:hover{background:var(--giv-card-2)}
.ga-service .giv-row-text b{font-size:var(--giv-text-base);font-weight:600;color:var(--giv-ink);overflow-wrap:anywhere}
.ga-service .giv-row-text small{font-size:var(--giv-text-min);line-height:1.35;color:var(--giv-ink-2);overflow-wrap:anywhere}
.ga-service .ga-badges{margin-top:4px}
.ga-service .ga-badges:empty{display:none!important}
html .ga-service .ga-badges > span{font-size:var(--giv-text-min);font-weight:600;padding:1px 8px}
.ga-service .ga-badges .giv-svg{width:14px;height:14px;margin-right:3px;flex:none}
.ga-service .ga-service-count{flex:none;font-weight:700;font-size:var(--giv-text-base);white-space:nowrap}
.ga-service .ga-service-actions{display:flex;justify-content:flex-start;gap:8px;margin:-4px 16px 10px 70px;padding:0;border:0}
html .ga-service .giv-service-edit{min-height:var(--giv-touch);min-width:var(--giv-touch);font-size:var(--giv-text-small)}
#dialog .grid .ga-service{border:0}
/* Settimane raccolte (Disponibilità della settimana): stessa riga. */
#content [data-ga-list] .president-week-group{position:relative;margin:0;border:0;border-radius:0;background:transparent}
html[data-theme="dark"] #content [data-ga-list] .president-week-group{background:transparent!important}
#content [data-ga-list] .president-week-group summary{min-height:60px;padding:10px 16px}
#content [data-ga-list] .president-week-hint{font-size:var(--giv-text-min);color:var(--giv-accent-ink)}
#content [data-ga-list] .president-week-title small{font-size:var(--giv-text-min);color:var(--giv-ink-2)}
#content [data-ga-list] .president-week-content{display:grid;gap:0;padding:0 0 8px 12px}
#content [data-ga-list] .president-week-content > button{justify-self:start;margin:4px 16px 8px}
@media(min-width:821px){
 /* PC: righe più basse, «Modifica» a destra della riga (come nell'Agenda della fase 2). */
 .ga-service{flex-direction:row;align-items:center}
 .ga-service .ga-service-main{flex:1;min-width:0;min-height:52px;padding:6px 12px 6px 16px}
 .ga-service .giv-row-text{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1.2fr) minmax(0,1fr);column-gap:16px;align-items:center}
 .ga-service .giv-row-text b{grid-column:1}
 .ga-service .ga-service-when{grid-column:2;grid-row:1}
 .ga-service .ga-service-where{grid-column:3;grid-row:1}
 .ga-service .ga-badges{grid-column:1 / -1}
 .ga-service .giv-chevron{display:none}
 .ga-service .ga-service-actions{margin:0 12px 0 0}
 #content [data-ga-list] .president-week-group summary{min-height:52px;padding:6px 16px}
}

/* ---------- Agenda: striscia dei giorni ---------- */
#content .ga-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;margin:12px 0 0;padding:8px 6px}
html #content .ga-day{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:64px;min-width:0;margin:0;padding:4px 0;border:0;border-radius:12px;background:transparent;box-shadow:none;color:var(--giv-ink-2);font-size:var(--giv-text-min);font-weight:500;cursor:pointer}
html[data-theme="dark"] #content .ga-day{background:transparent!important;border:0!important}
#content .ga-day:hover{background:var(--giv-card-2)}
#content .ga-day-name{font-size:var(--giv-text-min);letter-spacing:.02em}
#content .ga-day-num{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;font-size:var(--giv-text-base);font-weight:600;color:var(--giv-ink)}
#content .ga-day.is-today{color:var(--giv-accent-ink);font-weight:700}
#content .ga-day.is-today .ga-day-num{background:var(--giv-accent);color:#FFFFFF;font-weight:700}
#content .ga-day-dot{width:6px;height:6px;border-radius:50%;background:transparent}
#content .ga-day-dot.has-items{background:var(--giv-tone-indigo,#3552C9)}
#content .ga-week-label{margin-top:18px}
#content .ga-week-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:24px 20px;text-align:center}
#content .ga-week-text{display:flex;flex-direction:column;align-items:center;gap:6px}
#content .ga-week-empty b{font-size:var(--giv-text-base);font-weight:600;color:var(--giv-ink)}
#content .ga-week-text > span{font-size:var(--giv-text-small);line-height:1.4;color:var(--giv-ink-2);max-width:420px}
html #content .ga-week-action{min-height:var(--giv-touch);margin-top:4px;padding:0 20px;border:0;border-radius:12px;background:var(--giv-accent-soft,#E7EEF8);color:var(--giv-accent-ink);box-shadow:none;font-size:var(--giv-text-base);font-weight:600}
html[data-theme="dark"] #content .ga-week-action{background:var(--giv-card-2)!important;color:var(--giv-accent-ink)!important}
@media(min-width:821px){
 /* PC: striscia e settimana vuota affiancate, così le righe visibili sotto non diminuiscono. */
 #content .ga-week{display:grid;grid-template-columns:minmax(0,560px) minmax(0,1fr);gap:16px;align-items:stretch;margin-top:12px}
 #content .ga-week:not(.ga-week--empty){grid-template-columns:minmax(0,560px)}
 #content .ga-week .ga-days{margin:0;padding:6px;align-content:center}
 #content .ga-day{min-height:58px}
 #content .ga-week-side{display:flex;min-width:0}
 #content .ga-week-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0;padding:0}
 #content .ga-week-empty{flex:1;flex-direction:row;align-items:center;gap:12px;padding:10px 14px;text-align:left}
 #content .ga-week-empty .giv-tile{width:40px;height:40px;flex:none}
 #content .ga-week-text{align-items:flex-start;gap:2px;flex:1;min-width:0}
 #content .ga-week-text > span{font-size:var(--giv-text-min)}
 #content .ga-week-action{margin:0;flex:none}
}

@media (prefers-reduced-motion:reduce){.ga-service .ga-service-main,.ga-day{transition:none}}
