/*
 * assets/area.css — le poche regole nostre sopra il template dell'area
 * riservata. Colori e font del marchio NON stanno qui: li mette
 * tools/area_assets.py ricolorando il template. Qui c'e' solo quello che il
 * template non ha: il marchio in testata, i numeri delle code, la tabella
 * comune (BZ.tabella) e le caselle del cruscotto.
 */
body { font-family: 'Poppins', sans-serif; }

/* Il marchio */
/* Il logo e' largo (casco + scritta): il template lo vorrebbe quadrato. */
.header-container .theme-brand .theme-logo a img.bz-logo,
#sidebar .theme-brand div.theme-logo img.bz-logo { height: 38px !important; width: auto !important; max-width: none !important; }
.theme-brand .theme-logo { display: flex; align-items: center; }
.bz-marchio { font-family: 'Black Ops One', sans-serif !important; color: #EE5253 !important; letter-spacing: .5px; font-size: 22px !important; }
.bz-iniziale { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: #EE5253; color: #fff; font-weight: 600; }
.bz-al-sito { display: inline-flex; align-items: center; font-size: 13px; margin-left: 16px; white-space: nowrap; }
.bz-al-sito svg { width: 19px; height: 19px; }

/* I numeri delle code accanto alle voci di menu */
.bz-coda { margin-left: 6px; font-size: 11px; padding: 2px 7px; border-radius: 10px; vertical-align: middle; }

/* Parte centrale */
.bz-centrale { padding-bottom: 24px; margin-top: 14px; }
body.dark .btn-light { background: #1b2e4b; border-color: #1b2e4b; color: #e0e6ed; }
body.dark .btn-light:hover { background: #25406a; border-color: #25406a; color: #fff; }
.bz-azioni { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bz-scatola { background: #fff; border: 1px solid #e0e6ed; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 0 40px 0 rgba(94, 92, 154, .06); }
body.dark .bz-scatola { background: #0e1726; border-color: #1b2e4b; box-shadow: none; }
.bz-scatola > h5 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.bz-scatola > .bz-sotto { color: #888ea8; font-size: 13px; margin-bottom: 14px; }
.bz-nota { color: #888ea8; font-size: 13px; }

/* Le caselle dei numeri */
.bz-caselle { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.bz-casella { background: #fff; border: 1px solid #e0e6ed; border-radius: 8px; padding: 16px 18px; text-decoration: none; display: block; color: inherit; }
body.dark .bz-casella { background: #0e1726; border-color: #1b2e4b; }
a.bz-casella:hover { border-color: #EE5253; color: inherit; }
.bz-casella .t { font-size: 12.5px; color: #888ea8; }
.bz-casella .n { font-size: 24px; font-weight: 700; line-height: 1.25; }
.bz-casella .s { font-size: 12px; color: #888ea8; }
.bz-casella.verde .n { color: #00ab55; }
.bz-casella.rosso .n { color: #EE5253; }
.bz-casella.arancio .n { color: #e2a03f; }

/* La tabella comune */
.bz-tab-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.bz-tab-cerca { max-width: 260px; }
.bz-tab-quanti { color: #888ea8; font-size: 12.5px; margin-right: auto; }
.bz-tab th[data-az="ord"] { cursor: pointer; white-space: nowrap; user-select: none; }
.table.bz-tab thead tr th { padding: 10px 12px; font-size: 12.5px; letter-spacing: .3px; }
.table.bz-tab tbody tr td { padding: 10px 12px; font-size: 13.5px; }
.table.bz-tab tfoot tr th { padding: 10px 12px; white-space: nowrap; }
.bz-tab tfoot th { border-top: 2px solid #e0e6ed; font-size: 13.5px; }
.bz-tab .bz-largo { min-width: 220px; white-space: normal; }
.bz-tab-pagine { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; color: #888ea8; }
.bz-mini { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f1f2f3; }
.bz-due { display: flex; gap: 10px; align-items: center; }
.bz-due small { display: block; color: #888ea8; }
.bz-bottoni { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Attese e vuoti */
.bz-attesa { padding: 28px 8px; text-align: center; color: #888ea8; font-size: 13.5px; }
.bz-vuoto { padding: 34px 12px; text-align: center; color: #888ea8; font-size: 14px; }

/* Le liste a schede (eventi in attesa, segnalazioni, attivita', banner) */
.bz-lista { display: flex; flex-direction: column; gap: 12px; }
.bz-voce { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #e0e6ed; border-radius: 8px; padding: 14px; }
body.dark .bz-voce { background: #0e1726; border-color: #1b2e4b; }
.bz-voce.evidenza { border-left: 4px solid #EE5253; }
.bz-voce > img, .bz-voce > .bz-segnaposto { width: 92px; height: 92px; flex: 0 0 92px; border-radius: 8px; object-fit: cover; background: #f1f2f3; }
.bz-voce > img.tondo, .bz-voce > .bz-segnaposto.tondo { border-radius: 50%; width: 56px; height: 56px; flex-basis: 56px; }
.bz-voce > img.banner { width: 150px; flex-basis: 150px; height: 84px; object-fit: contain; }
body.dark .bz-voce > .bz-segnaposto, body.dark .bz-voce > img { background: #1b2e4b; }
.bz-voce .bz-info { flex: 1 1 auto; min-width: 0; }
.bz-voce .bz-info .t { font-weight: 600; font-size: 15px; }
.bz-voce .bz-info .s { color: #888ea8; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.bz-voce .bz-info .x { font-size: 13.5px; margin-top: 6px; overflow-wrap: anywhere; }
.bz-voce .bz-bottoni { flex: 0 0 auto; max-width: 320px; }
.bz-avviso { background: #fff5e6; border-left: 3px solid #e2a03f; padding: 8px 10px; border-radius: 4px; font-size: 13px; margin-top: 8px; color: #3b3f5c; }
body.dark .bz-avviso { background: #282625; color: #e0e6ed; }
.bz-foto-fila { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bz-foto-fila img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; }
@media (max-width: 767px) {
  .bz-voce { flex-wrap: wrap; }
  .bz-voce .bz-info { flex-basis: calc(100% - 110px); }
  .bz-voce .bz-bottoni { max-width: none; width: 100%; justify-content: flex-start; }
}

/* Le linguette (in attesa / pubblicate / …) */
.bz-linguette { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.bz-linguette button { border: 1px solid #e0e6ed; background: #fff; color: #3b3f5c; border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 500; }
.bz-linguette button.attiva { background: #EE5253; border-color: #EE5253; color: #fff; }
body.dark .bz-linguette button { background: #0e1726; border-color: #1b2e4b; color: #bfc9d4; }
body.dark .bz-linguette button.attiva { background: #EE5253; border-color: #EE5253; color: #fff; }
.bz-linguette button .q { opacity: .75; margin-left: 4px; }

/* Moduli */
.bz-modulo label { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.bz-modulo .form-text { font-size: 12px; }
.bz-modulo .row { --bs-gutter-y: 12px; }
.bz-stretto { max-width: 760px; }
.bz-medio { max-width: 1000px; }

/* La scheda di un'attivita' dentro la finestra */
.bz-copertina { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; background: #f1f2f3; }
.bz-scheda-testa { display: flex; gap: 14px; align-items: center; margin: -34px 0 12px 14px; position: relative; }
.bz-scheda-testa img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; background: #fff; }
.bz-scheda-testa.senza { margin-top: 0; margin-left: 0; }
.bz-dati { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.bz-dati dt { color: #888ea8; font-weight: 400; }
.bz-dati dd { margin: 0; overflow-wrap: anywhere; }
.modal-body h6 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: #888ea8; margin: 18px 0 8px; }

/* ── Area personale ── */
.bz-saluto { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bz-saluto > img { width: 64px; height: 64px; object-fit: cover; border: 2px solid #EE5253; }
.bz-avatar-grande { width: 150px; height: 150px; object-fit: cover; border: 3px solid #EE5253; }
/* Un interruttore con due righe di testo accanto: il testo resta di fianco, non va sotto. */
.form-switch .form-check-label { display: inline-block; vertical-align: top; max-width: calc(100% - 56px); }
.bz-social-pallino { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* I riquadri delle foto (garage, galleria dell'attivita') */
.bz-slot-fila { display: flex; gap: 10px; flex-wrap: wrap; }
.bz-slot { position: relative; width: 120px; height: 90px; border: 2px dashed #bfc9d4; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #888ea8; font-size: 12.5px; cursor: pointer; overflow: hidden; background: #fafafa; }
.bz-slot.pieno { border-style: solid; cursor: default; }
.bz-slot img { width: 100%; height: 100%; object-fit: cover; }
.bz-slot:not(.pieno):hover { border-color: #EE5253; color: #EE5253; }
body.dark .bz-slot { background: #1b2e4b; border-color: #3b3f5c; }
.bz-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; line-height: 22px; padding: 0; }
.bz-x:hover { background: #EE5253; }

/* La scheda dell'attivita': copertina e logo come su Facebook */
.bz-at-copertina { position: relative; height: 210px; background: #f1f2f3; display: flex; align-items: center; justify-content: center; color: #888ea8; cursor: pointer; }
.bz-at-copertina img { width: 100%; height: 100%; object-fit: cover; }
.bz-at-testa { display: flex; gap: 16px; align-items: flex-end; padding: 0 18px 14px; margin-top: -48px; position: relative; }
.bz-at-testa .bz-nota { padding-bottom: 4px; }
.bz-at-logo { position: relative; width: 104px; height: 104px; flex: 0 0 104px; border-radius: 50%; border: 4px solid #fff; background: #e0e6ed; display: flex; align-items: center; justify-content: center;
  color: #888ea8; font-size: 12.5px; cursor: pointer; }
.bz-at-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bz-at-logo .bz-x { top: 0; right: 0; }
body.dark .bz-at-copertina { background: #1b2e4b; }
body.dark .bz-at-logo { background: #25406a; border-color: #0e1726; }
@media (max-width: 575px) { .bz-at-copertina { height: 150px; } .bz-at-testa { flex-wrap: wrap; } }

/* Le pastiglie da toccare (categorie, marche, servizi) */
.bz-pastiglie { display: flex; flex-wrap: wrap; gap: 8px; }
.bz-pastiglia { border: 1px solid #bfc9d4; background: #fff; color: #3b3f5c; border-radius: 20px; padding: 6px 14px; font-size: 13px; line-height: 1.3; }
.bz-pastiglia:hover { border-color: #EE5253; }
.bz-pastiglia.presa { background: #fdecec; border-color: #EE5253; color: #d94647; font-weight: 500; }
.bz-pastiglia.principale { background: #EE5253; border-color: #EE5253; color: #fff; font-weight: 600; }
.bz-pastiglia small { display: block; font-size: 10px; font-weight: 400; opacity: .9; }
body.dark .bz-pastiglia { background: #0e1726; border-color: #3b3f5c; color: #bfc9d4; }
body.dark .bz-pastiglia.presa { background: #3a1f20; border-color: #EE5253; color: #EE5253; }
body.dark .bz-pastiglia.principale { background: #EE5253; color: #fff; }

/* Il bivio: collegata al profilo o solo attivita' */
.bz-scelta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: 100%; text-align: left; background: #fff; border: 2px solid #e0e6ed; border-radius: 10px; padding: 16px; color: #3b3f5c; }
.bz-scelta:hover { border-color: #EE5253; }
.bz-scelta strong { font-size: 15px; }
.bz-scelta span:not(.badge) { font-size: 13px; color: #888ea8; }
body.dark .bz-scelta { background: #0e1726; border-color: #1b2e4b; color: #e0e6ed; }

/* I suggerimenti dell'indirizzo */
.bz-suggerimenti { position: absolute; z-index: 20; left: 0; right: 0; background: #fff; border: 1px solid #e0e6ed; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); overflow: hidden; }
.bz-suggerimenti button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 14px; font-size: 13.5px; color: #3b3f5c; }
.bz-suggerimenti button:hover { background: #fdecec; }
.bz-suggerimenti button span { display: block; color: #888ea8; font-size: 12px; }
body.dark .bz-suggerimenti { background: #0e1726; border-color: #1b2e4b; }
body.dark .bz-suggerimenti button { color: #e0e6ed; }
body.dark .bz-suggerimenti button:hover { background: #1b2e4b; }

/* Gli orari */
.bz-giorno { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f1f2f3; }
.bz-giorno:last-child { border-bottom: 0; }
.bz-giorno > strong { width: 92px; font-size: 13.5px; }
.bz-giorno .form-check { width: 84px; }
.bz-ore { display: inline-flex; gap: 6px; }
.bz-ore input { width: 112px; }
.bz-giorno.chiuso .bz-ore { opacity: .4; }
body.dark .bz-giorno { border-color: #1b2e4b; }

/* Il «Salva» della scheda resta a portata di mano */
.bz-salva-barra { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 14px; align-items: center; justify-content: flex-end; background: #fff; border: 1px solid #e0e6ed;
  border-radius: 8px; padding: 12px 18px; box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
body.dark .bz-salva-barra { background: #0e1726; border-color: #1b2e4b; }

/* Le pagine di accesso (guscio piccolo) */
.bz-accesso-logo { display: block; text-align: center; margin-top: 18px; }
.bz-accesso-logo img { height: 54px; width: auto; }
body.form .card-body h2 { font-size: 22px; font-weight: 600; }
body.form .bz-linguette button { flex: 1 1 auto; }
/* Il campo-trappola della registrazione: fuori dallo schermo, non «display:none» (che i programmi riconoscono). */
.bz-sito { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bz-esito { min-height: 1.4em; margin-top: 14px; text-align: center; font-size: 13.5px; color: #888ea8; }
.bz-esito.ok { color: #00ab55; }
.bz-esito.errore { color: #e7515a; }
.bz-fornitori { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bz-apple { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 260px; height: 40px; background: #000; color: #fff;
  border: 1px solid #000; border-radius: 6px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px; font-weight: 500; }
.bz-apple:disabled { opacity: .5; }
body.dark .bz-apple { background: #fff; color: #000; border-color: #fff; }

/* In stampa resta solo la parte centrale: e' il foglio per il socio. */
@media print {
  .header-container, .sidebar-wrapper, .footer-wrapper, .secondary-nav .btn-toggle,
  .bz-tab-barra, .bz-tab-pagine, .bz-azioni, .bz-no-stampa { display: none !important; }
  .main-content, #content { margin: 0 !important; padding: 0 !important; }
  .bz-scatola, .bz-casella { box-shadow: none; break-inside: avoid; }
  body { background: #fff !important; }
}
