/* EMAN GROUP — global cookie consent */
:root {
  --eg-consent-blue: #0067b8;
  --eg-consent-blue-dark: #005291;
  --eg-consent-ink: #111827;
  --eg-consent-muted: #4b5563;
  --eg-consent-line: #d1d5db;
  --eg-consent-soft: #f5f7fa;
  --eg-consent-white: #ffffff;
  --eg-consent-danger: #8b1e1e;
}

html.eg-consent-loading::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(255, 255, 255, 0.94);
}

body.eg-consent-open {
  overflow: hidden !important;
}

.eg-consent,
.eg-consent * {
  box-sizing: border-box;
}

.eg-consent {
  font-family: "Segoe UI", SegoeUI, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--eg-consent-ink);
}

.eg-consent-modal[hidden],
.eg-consent [hidden] {
  display: none !important;
}

.eg-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  place-items: center;
  padding: 20px;
}

.eg-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(3px);
}

.eg-consent-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  background: var(--eg-consent-white);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  outline: none;
}

.eg-consent-dialog__header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--eg-consent-line);
}

.eg-consent-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f3fb;
  color: var(--eg-consent-blue-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.eg-consent-dialog h2 {
  margin: 13px 42px 8px 0;
  color: var(--eg-consent-ink);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  font-weight: 700;
}

.eg-consent-dialog__header > p {
  margin: 0;
  max-width: 68ch;
  color: var(--eg-consent-muted);
  font-size: 15px;
  line-height: 1.6;
}

.eg-consent-mandatory-hint {
  margin-top: 12px !important;
  padding: 10px 12px;
  border-left: 3px solid var(--eg-consent-blue);
  background: #eef6fc;
  color: var(--eg-consent-ink) !important;
  font-weight: 600;
}

.eg-consent-dialog__close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--eg-consent-line);
  border-radius: 999px;
  background: var(--eg-consent-white);
  color: var(--eg-consent-ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.eg-consent-dialog__close:hover {
  background: var(--eg-consent-soft);
}

.eg-consent-modal[data-mandatory="true"] .eg-consent-dialog__close {
  display: none;
}

.eg-consent-dialog__body {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px;
  overscroll-behavior: contain;
}

.eg-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(165px, auto);
  gap: 22px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--eg-consent-line);
}

.eg-consent-category:first-child {
  padding-top: 0;
}

.eg-consent-category:last-child {
  border-bottom: 0;
}

.eg-consent-category h3 {
  margin: 0 0 6px;
  color: var(--eg-consent-ink);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
}

.eg-consent-category p {
  margin: 0;
  color: var(--eg-consent-muted);
  font-size: 14px;
  line-height: 1.55;
}

.eg-consent-category__control {
  display: grid;
  justify-items: end;
  gap: 7px;
  text-align: right;
}

.eg-consent-category__status {
  max-width: 190px;
  color: var(--eg-consent-muted);
  font-size: 12px;
  line-height: 1.35;
}

.eg-consent-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--eg-consent-line);
  border-radius: 999px;
  background: var(--eg-consent-soft);
  color: var(--eg-consent-ink);
  font-size: 13px;
  font-weight: 700;
}

.eg-consent-state--active {
  border-color: #8ac7a1;
  background: #edf9f1;
  color: #165b2d;
}

.eg-consent-switch {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 165px;
  cursor: pointer;
}

.eg-consent-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.eg-consent-switch > span {
  position: relative;
  width: 46px;
  height: 26px;
  display: block;
  border: 1px solid #8b95a3;
  border-radius: 999px;
  background: #e5e7eb;
  transition: background 160ms ease, border-color 160ms ease;
}

.eg-consent-switch > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--eg-consent-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease;
}

.eg-consent-switch input:checked + span {
  border-color: var(--eg-consent-blue);
  background: var(--eg-consent-blue);
}

.eg-consent-switch input:checked + span::after {
  transform: translateX(20px);
}

.eg-consent-switch input:focus-visible + span {
  outline: 3px solid rgba(0, 103, 184, 0.25);
  outline-offset: 3px;
}

.eg-consent-switch b {
  color: var(--eg-consent-ink);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.eg-consent-switch--disabled {
  cursor: default;
  opacity: 0.85;
}

.eg-consent-receipt,
.eg-consent-legal,
.eg-consent-feedback {
  margin: 15px 0 0;
  color: var(--eg-consent-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.eg-consent-legal a {
  color: var(--eg-consent-blue-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.eg-consent-feedback {
  min-height: 1.5em;
  color: #17612f;
  font-weight: 600;
}

.eg-consent-feedback[data-error="true"] {
  color: var(--eg-consent-danger);
}

.eg-consent-dialog__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 32px 24px;
  border-top: 1px solid var(--eg-consent-line);
  background: var(--eg-consent-white);
}

.eg-consent-btn {
  appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  cursor: pointer;
}

.eg-consent-btn:focus-visible,
.eg-consent-dialog__close:focus-visible,
.eg-consent-launcher:focus-visible {
  outline: 3px solid rgba(0, 103, 184, 0.3);
  outline-offset: 3px;
}

.eg-consent-btn--accept {
  background: var(--eg-consent-blue);
  color: var(--eg-consent-white);
}

.eg-consent-btn--accept:hover {
  background: var(--eg-consent-blue-dark);
}

.eg-consent-btn--reject {
  background: #273241;
  color: var(--eg-consent-white);
}

.eg-consent-btn--reject:hover {
  background: #111827;
}

.eg-consent-btn--settings {
  border-color: #98a2b3;
  background: var(--eg-consent-white);
  color: var(--eg-consent-ink);
}

.eg-consent-btn--settings:hover {
  background: var(--eg-consent-soft);
}

.eg-consent-launcher {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147482500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #9aa4b2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--eg-consent-ink);
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.18);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.eg-consent-launcher:hover {
  background: var(--eg-consent-soft);
}

.eg-consent-launcher__icon {
  font-size: 16px;
  line-height: 1;
}

.eg-consent-modal:not([hidden]) ~ .eg-consent-launcher,
.eg-consent-modal:not([hidden]) + .eg-consent-launcher {
  visibility: hidden;
}

.eg-consent-blocked {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  background: var(--eg-consent-soft) !important;
}

iframe.eg-consent-blocked {
  display: none !important;
}

.eg-consent-noscript {
  position: relative;
  z-index: 2147483601;
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid #d8b44b;
  background: #fff8db;
  color: #332a0b;
  font: 600 14px/1.5 "Segoe UI", SegoeUI, Arial, sans-serif;
  text-align: center;
}

@media (max-width: 720px) {
  .eg-consent-modal {
    align-items: end;
    padding: 0;
  }

  .eg-consent-dialog {
    width: 100%;
    max-height: min(92vh, 860px);
    border-radius: 18px 18px 0 0;
  }

  .eg-consent-dialog__header {
    padding: 24px 20px 17px;
  }

  .eg-consent-dialog__body {
    padding: 20px;
  }

  .eg-consent-category {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .eg-consent-category__control {
    justify-items: start;
    text-align: left;
  }

  .eg-consent-dialog__actions {
    grid-template-columns: 1fr;
    padding: 14px 20px max(18px, env(safe-area-inset-bottom));
  }

  .eg-consent-launcher {
    left: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eg-consent-switch > span,
  .eg-consent-switch > span::after {
    transition: none;
  }
}

@media print {
  .eg-consent {
    display: none !important;
  }
}

/* ========================================================================== 
   EMAN GROUP — compact Microsoft-inspired consent theme
   ========================================================================== */
:root {
  --eg-consent-blue: #0067b8;
  --eg-consent-blue-dark: #005a9e;
  --eg-consent-ink: #1a1a1a;
  --eg-consent-muted: #323130;
  --eg-consent-line: #d2d0ce;
  --eg-consent-soft: #f3f2f1;
  --eg-consent-white: #ffffff;
}

.eg-consent-modal {
  place-items: center;
  padding: 12px;
}

.eg-consent-modal__backdrop {
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: none;
}

.eg-consent-dialog {
  width: min(426px, calc(100vw - 24px));
  max-height: min(432px, calc(100vh - 24px));
  border: 1px solid var(--eg-consent-blue);
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.eg-consent-dialog__header {
  padding: 20px 24px 10px;
  border-bottom: 0;
}

.eg-consent-badge {
  display: none;
}

.eg-consent-dialog h2 {
  margin: 0 30px 9px 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
}

.eg-consent-dialog__header > p {
  font-size: 11px;
  line-height: 1.35;
  color: var(--eg-consent-muted);
}

.eg-consent-mandatory-hint {
  margin-top: 8px !important;
  padding: 7px 9px;
  border-left-width: 2px;
  background: #f3f8fc;
  font-size: 10.5px !important;
  font-weight: 400;
}

.eg-consent-dialog__close {
  top: 8px;
  right: 8px;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 300;
}

.eg-consent-dialog__close:hover {
  background: var(--eg-consent-soft);
}

.eg-consent-dialog__body {
  padding: 0 24px 12px;
  scrollbar-width: thin;
}

.eg-consent-category {
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  padding: 12px 0 13px;
  border-bottom: 0;
}

.eg-consent-category:first-child {
  padding-top: 5px;
}

.eg-consent-category h3 {
  margin: 0 0 2px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
}

.eg-consent-category p {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--eg-consent-muted);
}

.eg-consent-category__control {
  justify-items: start;
  text-align: left;
  gap: 3px;
}

.eg-consent-category__status,
.eg-consent-state {
  display: none;
}

.eg-consent-required-label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--eg-consent-muted);
}

.eg-consent-radio-group {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.eg-consent-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--eg-consent-ink);
  font-size: 10.5px;
  line-height: 1;
  cursor: pointer;
}

.eg-consent-radio input {
  appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 1px solid #201f1e;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
}

.eg-consent-radio input::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #201f1e;
  transform: scale(0);
}

.eg-consent-radio input:checked::before {
  transform: scale(1);
}

.eg-consent-radio input:focus-visible {
  outline: 2px solid rgba(0, 103, 184, 0.35);
  outline-offset: 2px;
}

.eg-consent-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eg-consent-receipt,
.eg-consent-legal,
.eg-consent-feedback {
  margin-top: 8px;
  font-size: 9.5px;
  line-height: 1.35;
}

.eg-consent-dialog__actions {
  gap: 6px;
  padding: 10px 24px 16px;
  border-top: 0;
}

.eg-consent-dialog__actions--custom {
  grid-template-columns: 1fr 1fr;
}

.eg-consent-btn {
  min-height: 24px;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 400;
}

.eg-consent-btn--accept {
  background: var(--eg-consent-blue);
  color: #fff;
}

.eg-consent-btn--accept:hover {
  background: var(--eg-consent-blue-dark);
}

.eg-consent-btn--reject,
.eg-consent-btn--settings {
  border: 0;
  background: #edebe9;
  color: #201f1e;
}

.eg-consent-btn--reject:hover,
.eg-consent-btn--settings:hover {
  background: #e1dfdd;
}

.eg-consent-launcher {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 0;
  border-color: #8a8886;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  font-size: 10.5px;
  font-weight: 400;
}

@media (max-width: 520px) {
  .eg-consent-modal {
    align-items: center;
    padding: 8px;
  }

  .eg-consent-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 0;
  }

  .eg-consent-dialog__header {
    padding: 17px 18px 8px;
  }

  .eg-consent-dialog__body {
    padding: 0 18px 10px;
  }

  .eg-consent-dialog__actions {
    padding: 8px 18px 14px;
  }

  .eg-consent-dialog__actions:not(.eg-consent-dialog__actions--custom) {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   EMAN GROUP — Cookie consent brand blue
   Deve rimanere alla fine assoluta di cookie-consent.css
   ========================================================== */

:root {
  --eg-consent-blue: #2f6df6;
  --eg-consent-blue-dark: #245bd8;
  --eg-consent-blue-soft: #eef3ff;
  --eg-consent-blue-focus: rgba(47, 109, 246, 0.25);
}

/* Bordo esterno del popup */
.eg-consent-dialog {
  border-color: var(--eg-consent-blue) !important;
}

/* Avviso iniziale */
.eg-consent-mandatory-hint {
  border-left-color: var(--eg-consent-blue) !important;
  background: var(--eg-consent-blue-soft) !important;
}

/* Pulsante principale */
.eg-consent-btn--accept {
  background: var(--eg-consent-blue) !important;
  color: #ffffff !important;
}

.eg-consent-btn--accept:hover {
  background: var(--eg-consent-blue-dark) !important;
}

/* Link legali */
.eg-consent-legal a {
  color: var(--eg-consent-blue) !important;
}

/* Radio selezionati */
.eg-consent-radio input:checked {
  border-color: var(--eg-consent-blue) !important;
}

.eg-consent-radio input:checked::before {
  background: var(--eg-consent-blue) !important;
}

/* Focus accessibile nel blu del sito */
.eg-consent-radio input:focus-visible,
.eg-consent-btn:focus-visible,
.eg-consent-dialog__close:focus-visible,
.eg-consent-launcher:focus-visible {
  outline-color: var(--eg-consent-blue-focus) !important;
}

/* Eventuali switch presenti in altre schermate */
.eg-consent-switch input:checked + span {
  border-color: var(--eg-consent-blue) !important;
  background: var(--eg-consent-blue) !important;
}

.eg-consent-switch input:focus-visible + span {
  outline-color: var(--eg-consent-blue-focus) !important;
}

/* ==========================================================
   UI18 — cookie launcher cleanup
   The consent dialog still opens on the first visit and through
   explicit settings links, but no persistent bottom-left button
   is rendered on any viewport.
   ========================================================== */
.eg-consent-launcher,
[data-consent-launcher],
[data-cookie-launcher]{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
