/* Additional controls for the standalone export; the original theme is unchanged. */
.calendar-promo { display:block; border-radius:1.75rem; overflow:hidden; box-shadow:var(--holiday-glow); background:var(--card); }
.calendar-promo canvas { display:block; width:100%; height:auto; }
#pdf-reader { padding:2.7rem; color:var(--ink); }
.pdf-toolbar { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:.8rem; margin-bottom:1.2rem; }
.pdf-toolbar button, .pdf-toolbar a { border-radius:1rem; background:var(--brand); color:var(--primary-foreground); padding:.8rem 1.2rem; font-weight:800; font-size:1.4rem; min-width:3.6rem; text-align:center; }
.pdf-toolbar button:disabled { opacity:.4; }
.pdf-toolbar output { min-width:6rem; color:var(--holiday-champagne); font-size:1.4rem; text-align:center; }
.pdf-scroll { overflow:auto; max-height:70rem; background:var(--card); border-radius:1.2rem; }
.pdf-scroll canvas { display:block; margin:auto; }
.pdf-error { background:var(--card); color:var(--ink); padding:2rem; text-align:center; }
#standalone-map { height:52rem; margin-top:1.2rem; border-radius:1.5rem; z-index:0; }
.export-event { display:flex; gap:1.2rem; border-radius:1.4rem; background:var(--card); padding:1.4rem; color:var(--ink); }
.export-event h3 { font-size:1.35rem; font-weight:800; }
.export-event p { font-size:1rem; }
.export-event time { background:var(--brand); color:var(--primary-foreground); padding:1rem; border-radius:1rem; align-self:start; white-space:nowrap; }
button { cursor:pointer; }
.export-clock { white-space:nowrap; color:var(--holiday-champagne); font-size:1.2rem; font-weight:800; font-variant-numeric:tabular-nums; }
html[data-theme="christmas"] .totem-section-head h2 { background-image:var(--gradient-gold); background-clip:text; }

/* IAT Totem: round flag buttons, shared by every PHP-language template.
   The original accessible language labels and click handlers remain unchanged. */
header [aria-label="Lingua"] button[aria-label] {
  position:relative;
  font-size:0!important;
  overflow:hidden;
}
header [aria-label="Lingua"] button[aria-label]::before {
  content:"";
  display:block;
  position:absolute;
  width:70%;
  height:70%;
  left:15%;
  top:15%;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.6);
  box-shadow:0 1px 6px rgba(0,0,0,.27);
  background-position:center;
  background-size:cover;
}
header [aria-label="Lingua"] button[aria-label="IT"]::before {
  background-image:linear-gradient(90deg,#009246 0 33.333%,#fff 33.333% 66.666%,#ce2b37 66.666% 100%);
}
header [aria-label="Lingua"] button[aria-label="DE"]::before {
  background-image:linear-gradient(180deg,#111 0 33.333%,#dd0000 33.333% 66.666%,#ffce00 66.666% 100%);
}
header [aria-label="Lingua"] button[aria-label="FR"]::before {
  background-image:linear-gradient(90deg,#002395 0 33.333%,#fff 33.333% 66.666%,#ed2939 66.666% 100%);
}
header [aria-label="Lingua"] button[aria-label="EN"]::before,
header [aria-label="Lingua"] button[aria-label="GB"]::before {
  background-color:#012169;
  background-image:
    linear-gradient(27deg,transparent 43%,#fff 43% 47%,#c8102e 47% 50%,#fff 50% 55%,transparent 55%),
    linear-gradient(-27deg,transparent 43%,#fff 43% 47%,#c8102e 47% 50%,#fff 50% 55%,transparent 55%),
    linear-gradient(0deg,transparent 39%,#fff 39% 44%,#c8102e 44% 56%,#fff 56% 61%,transparent 61%),
    linear-gradient(90deg,transparent 38%,#fff 38% 44%,#c8102e 44% 56%,#fff 56% 62%,transparent 62%);
}
header [aria-label="Lingua"] button[aria-pressed="true"]::before {
  box-shadow:0 1px 5px rgba(0,0,0,.28),0 0 0 2px rgba(255,255,255,.8);
}

/* Kiosk portrait safety pass: 1080x1920 and adjacent kiosk viewports.
   Preserve the original Christmas layout and keep content accessible above
   the persistent bottom navigation. */
@media (orientation:portrait) and (min-width:960px) and (max-width:1150px) and (min-height:1500px) {
  html[data-theme="christmas"],
  html[data-theme="christmas"] body {
    max-width:100%;
    overflow-x:hidden;
  }
  .totem-frame {
    width:100%;
    max-width:100%;
    min-height:100dvh;
    overflow-x:clip;
  }
  .xmas-content {
    padding-bottom:max(12rem,env(safe-area-inset-bottom,0px) + 11rem)!important;
  }
  .totem-fixed {
    max-width:100vw;
  }
  .totem-panel {
    max-width:min(34.8rem,calc(100vw - 3rem));
  }
  #iat-events-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:1.65rem!important;
  }
  #iat-events-grid article[data-iat-event] {
    min-width:0;
    overflow-wrap:anywhere;
  }
  #standalone-map,
  #standalone-map iframe,
  #pdf-reader,
  .pdf-scroll {
    max-width:100%;
  }
  .pdf-scroll {overscroll-behavior:contain}
  nav[aria-label="Navigazione totem"] {
    padding-bottom:max(.45rem,env(safe-area-inset-bottom,0px));
  }
}