/* ═══════════════════════════════════════════════════════════
   ARIAGAS – top_nav.css  (barra superiore globale)
   Tema: Rosso Fuoco #C0392B
   ═══════════════════════════════════════════════════════════ */

/* ── TOP NAV ─────────────────────────────────────────────── */
.gtn-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: #C0392B;
  display: flex;
  align-items: center;
  z-index: 800;
  padding: 0 10px;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.gtn-back {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
  width: 38px; height: 38px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s;
}
.gtn-back:hover { background: rgba(255,255,255,.35); }
.gtn-title {
  flex: 1;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gtn-search-wrap {
  flex: 1;
  position: relative;
}
.gtn-search {
  width: 100%;
  background: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 14px 8px 34px;
  color: #111;
  font-size: 20px;
  font-weight: 500;
  outline: none;
  transition: box-shadow .15s;
}
.gtn-search::placeholder { color: #888; }
.gtn-search:focus { box-shadow: 0 0 0 2px rgba(192,57,43,.45); }
.gtn-search-ico {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.gtn-search-drop {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  max-height: 420px;
  overflow-y: auto;
  z-index: 2000;
  display: none;
}
.gtn-search-drop.show { display: block; }

/* ── Card risultato ricerca ──────────────────────────────── */
.gtn-drop-card {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.gtn-drop-card:last-child { border-bottom: none; }

.gtn-dc-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.gtn-dc-nome {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  flex: 1;
}
.gtn-dc-tel {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.gtn-dc-info {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  line-height: 1.4;
}
.gtn-dc-ultimo {
  color: #888;
  margin-bottom: 8px;
}
.gtn-dc-ultimo strong {
  color: #444;
}
.gtn-dc-link-appt {
  color: #C0392B;
  text-decoration: none;
  font-weight: 600;
}
.gtn-dc-link-appt:hover {
  text-decoration: underline;
}
.gtn-dc-link-appt strong {
  color: #C0392B;
}
.gtn-dc-dist {
  color: #922B21;
  font-weight: 600;
  white-space: nowrap;
}

.gtn-dc-azioni {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gtn-dc-btn {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.gtn-dc-btn:hover { opacity: .82; }
.gtn-dc-btn { border: none; cursor: pointer; }
.gtn-dc-cal { background: #C0392B; color: #fff; }
.gtn-dc-cal.gtn-dc-cal-on { background: #922B21; }
.gtn-dc-new { background: #27ae60;          color: #fff; }
.gtn-dc-ana { background: #f0f0f0;          color: #444; }

/* Pannello appuntamenti inline nel dropdown */
.gtn-dc-appt-panel {
  margin-top: 10px;
  border-top: 1px solid #f0e0de;
  padding-top: 6px;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.gtn-dc-appt-hd {
  font-size: 11px;
  font-weight: 700;
  color: #C0392B;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 2px 6px;
}
.gtn-dc-appt-load {
  text-align: center;
  padding: 8px;
  color: #888;
  font-size: 12px;
}
.gtn-dc-appt-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 2px;
  border-bottom: 1px solid #f3f3f3;
  font-size: 12px;
}
.gtn-dc-appt-item:last-child { border-bottom: none; }
.gtn-dc-appt-date {
  font-weight: 700;
  color: #C0392B;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
}
.gtn-dc-appt-desc {
  flex: 1;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gtn-dc-appt-imp {
  font-weight: 700;
  color: #27ae60;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
}

.gtn-clock {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 42px;
  text-align: right;
}
.gtn-print-btn {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: 18px;
  border-radius: 10px;
  width: 38px; height: 38px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.gtn-print-btn:hover { background: rgba(255,255,255,.35); }

/* Spazio per non coprire contenuto */
body { padding-top: 52px; }

/* ── STAMPA A4 ───────────────────────────────────────────── */
@page {
  size: A4 portrait;
  margin: 1cm 1.2cm;
}
@media print {
  /* Nascondi navigazione e UI */
  .gtn-bar, .gbn-nav, .gbn-overlay, .gbn-menu,
  .fab-menu, .overlay, .side-menu, #desk-menu,
  .cal-toggle-bar, .cal-wrapper, .prossimo-box, .offline-banner,
  #pwa-banner, .drawer-overlay, .drawer,
  button:not(.print-keep), nav { display: none !important; }

  /* Reset corpo */
  html, body {
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    font-size: 9pt !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Contenuto al 100% della pagina (escluso cal-wrapper) */
  .app, .app-body, .content, .eventi-list,
  .day-section, .container, .wrap, main, article, section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    height: auto !important;
    display: block !important;
  }

  /* Tabelle */
  table { border-collapse: collapse; width: 100%; }
  td, th { border: 1px solid #999; padding: 4pt; font-size: 8pt; }

  /* Link e ombre */
  * { box-shadow: none !important; text-shadow: none !important; }
  a { color: #000 !important; text-decoration: none !important; }

  /* Evita tagli a pagina */
  .evento-card { page-break-inside: avoid; break-inside: avoid; }

  /* Header di stampa (se presente) */
  .print-header { display: block !important; }
}

/* Desktop */
@media (min-width: 900px) {
  .gtn-bar { position: sticky; }
}
