:root { --venafro-notice-height: 0px; }
body.has-visitor-notices { --venafro-notice-height: 44px; }
#visitor-notices-host [hidden] { display: none !important; }
.visitor-notice-bar {
 position: fixed;
 top: var(--wp-admin--admin-bar--height, 0px);
 left: 0;
 right: 0;
 z-index: 40;
 background: #f5e6be;
 color: #1e3026;
 font-family: var(--font-sans, system-ui, sans-serif);
}
.visitor-notice-bar__trigger {
 display: grid;
 grid-template-columns: auto minmax(0, 1fr) auto;
 align-items: center;
 gap: 20px;
 width: min(1280px, 100%);
 min-height: 44px;
 margin: 0 auto;
 padding: 8px 32px;
 border: 0;
 border-radius: 0;
 background: transparent;
 color: inherit;
 font: 400 14px/1.4 var(--font-sans, system-ui, sans-serif);
 text-align: left;
 cursor: pointer;
}
.visitor-notice-bar__label { font-weight: 700; white-space: nowrap; }
.visitor-notice-bar__preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.visitor-notice-bar__action { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.visitor-notice-bar__trigger:focus-visible { outline: 3px solid #1e3026; outline-offset: -4px; }
.visitor-notices-dialog {
 box-sizing: border-box;
 width: min(760px, calc(100% - 32px));
 max-width: none;
 max-height: calc(100dvh - 32px);
 margin: auto;
 padding: 28px;
 border: 0;
 border-radius: 0;
 background: #f8f6f0;
 color: #1e3026;
 font: 400 16px/1.6 var(--font-sans, system-ui, sans-serif);
 overflow-y: auto;
 overscroll-behavior: contain;
}
.visitor-notices-dialog::backdrop { background: #101d15b3; }
body:has(.visitor-notices-dialog[open]) { overflow: hidden; }
.visitor-notices-dialog__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; position: sticky; top: 0; z-index: 1; background: #f8f6f0; }
.visitor-notices-dialog__header h2 { margin: 0; color: inherit; font: 700 28px/1.2 var(--font-sans, system-ui, sans-serif); letter-spacing: normal; }
.visitor-notices-close {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 flex-shrink: 0;
 min-height: 44px;
 padding: 8px 12px;
 border: 0;
 border-radius: 0;
 color: #fff;
 background: #1e3026;
 font: 600 16px/1.4 var(--font-sans, system-ui, sans-serif);
 cursor: pointer;
}
.visitor-notice { padding: 20px; background: #fff; margin: 0 0 16px; }
.visitor-notice:last-child { margin-bottom: 0; }
.visitor-notice--important { background: #f5e6be; }
.visitor-notice-kind { font-weight: 700; margin: 0 0 8px; }
.visitor-notice h3 { margin: 0 0 12px; color: inherit; font: 700 22px/1.3 var(--font-sans, system-ui, sans-serif); letter-spacing: normal; }
.visitor-notice-content p { margin: 0 0 12px; }
.visitor-notice-content > :last-child { margin-bottom: 0; }
.visitor-notice-content a { color: #164b35; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.visitor-notices-dialog :focus-visible { outline: 3px solid #795d25; outline-offset: 4px; }
.visitor-notices-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* La fascia occupa spazio proprio, senza coprire intestazione e navigazione. */
body.has-visitor-notices .topbar { top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--venafro-notice-height)); }
body.has-visitor-notices .chapter-nav { top: calc(98px + var(--wp-admin--admin-bar--height, 0px) + var(--venafro-notice-height)); }
body.has-visitor-notices .page-content { padding-top: calc(126px + var(--venafro-notice-height)); }
body.has-visitor-notices .plain-mode .static-view { padding-top: calc(50px + var(--venafro-notice-height)); }
body.has-visitor-notices .tour-end { top: calc(105px + var(--venafro-notice-height)); }
html.has-visitor-notices { scroll-padding-top: calc(110px + var(--venafro-notice-height) + var(--wp-admin--admin-bar--height, 0px)); }
@media (max-width: 768px) {
 body.has-visitor-notices .world { top: calc(66px + var(--venafro-notice-height) + var(--wp-admin--admin-bar--height, 0px)); }
 body.has-visitor-notices .page-content { padding-top: calc(100px + var(--venafro-notice-height)); }
 body.has-visitor-notices .plain-mode .static-view { padding-top: calc(20px + var(--venafro-notice-height)); }
 body.has-visitor-notices .tour-end { top: calc(74px + var(--venafro-notice-height)); }
 .visitor-notice-bar__trigger { padding-inline: 20px; gap: 12px; }
}
@media (max-width: 640px) {
 .visitor-notice-bar__trigger { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 16px; }
 .visitor-notice-bar__preview { display: none; }
 .visitor-notices-dialog { padding: 20px; }
 .visitor-notices-dialog__header { gap: 12px; }
 .visitor-notices-dialog__header h2 { font-size: 24px; }
 .visitor-notice { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .visitor-notices-dialog { scroll-behavior: auto; } }

/* Blocco Avviso ai visitatori in prima pagina */
.home-visitor-notice-section {
  padding-top: var(--wp--custom--space--px-40, 40px);
  padding-bottom: var(--wp--custom--space--px-40, 40px);
  background: var(--wp--preset--color--background, #ffffff);
}
.home-visitor-notice-box {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 4px;
  padding: 28px 32px;
  background: #f8f6f0;
  color: #1e3026;
  border-left: 6px solid #164b35;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  font-family: var(--font-sans, system-ui, sans-serif);
}
.home-visitor-notice-box--important {
  background: #fbf3df;
  border-left-color: #8f5c00;
}
.home-visitor-notice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}
.home-visitor-notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: #164b35;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
}
.home-visitor-notice-badge svg {
  display: block;
  flex-shrink: 0;
}
.home-visitor-notice-box--important .home-visitor-notice-badge {
  background: #8f5c00;
  color: #ffffff;
}
.home-visitor-notice-all-btn {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  color: #164b35;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.home-visitor-notice-box--important .home-visitor-notice-all-btn {
  color: #614000;
}
.home-visitor-notice-all-btn:hover {
  opacity: 0.85;
}
.home-visitor-notice-all-btn:focus-visible {
  outline: 3px solid #164b35;
  outline-offset: 2px;
}
.home-visitor-notice-title {
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: #1e3026;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.home-visitor-notice-content {
  font-size: 17px;
  line-height: 1.6;
  color: #2b3a30;
}
.home-visitor-notice-content p {
  margin: 0 0 10px;
}
.home-visitor-notice-content p:last-child {
  margin-bottom: 0;
}
.home-visitor-notice-content a {
  color: #164b35;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-visitor-notice-placeholder {
  padding: 24px;
  border: 2px dashed #b0bec5;
  background: #f9fbfb;
  color: #37474f;
  font-family: var(--font-sans, system-ui, sans-serif);
  border-radius: 4px;
  text-align: center;
  margin: 20px 0;
}
@media (max-width: 640px) {
  .home-visitor-notice-box {
    padding: 20px 18px;
  }
  .home-visitor-notice-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
