/* FOX FILES - Gestione consenso cookie (vedi js/cookie-consent.js) */

.ffc-banner,
.ffc-overlay {
  --ffc-bg: #0a2626;
  --ffc-bg-2: #0e3030;
  --ffc-fg: #eaf2f1;
  --ffc-muted: #a8bfbc;
  --ffc-accent: #f26935;
  --ffc-accent-hover: #ff8052;
  --ffc-line: rgba(255, 255, 255, 0.14);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ffc-fg);
  text-align: left;
}
.ffc-banner *,
.ffc-overlay * { box-sizing: border-box; }
.ffc-banner[hidden],
.ffc-overlay[hidden] { display: none !important; }

/* ---------- Banner ---------- */
.ffc-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 2147483000;
  width: min(960px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 28px;
  align-items: center;
  padding: 22px 56px 22px 26px;
  background: var(--ffc-bg);
  border: 1px solid rgba(242, 105, 53, 0.55);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translate(-50%, 24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ffc-banner.ffc-show { opacity: 1; transform: translate(-50%, 0); }

.ffc-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: #fff; }
.ffc-text { margin: 0 0 8px; }
.ffc-muted { color: var(--ffc-muted); margin: 4px 0 0; }
.ffc-note { margin: 0; font-size: 0.8rem; color: var(--ffc-muted); }
.ffc-small { margin: 12px 0 0; font-size: 0.78rem; color: var(--ffc-muted); }
.ffc-h3 { margin: 16px 0 4px; font-size: 0.9rem; font-weight: 700; color: #fff; }

.ffc-banner a,
.ffc-overlay a { color: var(--ffc-accent); text-decoration: underline; text-underline-offset: 2px; }
.ffc-banner a:hover,
.ffc-overlay a:hover { color: var(--ffc-accent-hover); }

.ffc-actions { display: flex; flex-direction: column; gap: 10px; min-width: 210px; }

/* ---------- Pulsanti ---------- */
.ffc-btn {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
/* "Rifiuta tutto" e "Accetta tutto" hanno lo stesso stile: pari evidenza */
.ffc-btn-main { background: var(--ffc-accent); border-color: var(--ffc-accent); color: #0b1a1a; }
.ffc-btn-main:hover { background: var(--ffc-accent-hover); border-color: var(--ffc-accent-hover); }
.ffc-btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.4); color: var(--ffc-fg); }
.ffc-btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.ffc-btn-link { background: none; border: 0; color: var(--ffc-accent); text-decoration: underline; text-underline-offset: 2px; min-height: 36px; }
.ffc-btn-link:hover { color: var(--ffc-accent-hover); }

.ffc-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ffc-fg);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.ffc-x:hover { background: rgba(255, 255, 255, 0.1); }
.ffc-x-static { position: static; flex: none; }

.ffc-banner :focus-visible,
.ffc-overlay :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ffc-slider { outline-offset: 2px; }

/* ---------- Pannello preferenze ---------- */
.ffc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 12, 12, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ffc-overlay.ffc-show { opacity: 1; }

.ffc-panel {
  width: min(660px, 100%);
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--ffc-bg);
  border: 1px solid rgba(242, 105, 53, 0.55);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  outline: none;
}
.ffc-p-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px 24px;
  border-bottom: 1px solid var(--ffc-line);
}
.ffc-p-head .ffc-title { margin: 0; font-size: 1.15rem; }
.ffc-scroll { padding: 18px 24px; overflow-y: auto; flex: 1 1 auto; }

.ffc-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 14px 0;
  padding: 14px 16px;
  background: var(--ffc-bg-2);
  border: 1px solid var(--ffc-line);
  border-radius: 12px;
}
.ffc-cat-title { margin: 0; font-size: 0.95rem; font-weight: 700; color: #fff; }
.ffc-always { font-size: 0.78rem; font-weight: 700; color: var(--ffc-accent); white-space: nowrap; }

/* Interruttore */
.ffc-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: none; cursor: pointer; }
.ffc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.ffc-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3b5755;
  transition: background-color 0.2s ease;
}
.ffc-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.ffc-switch input:checked + .ffc-slider { background: var(--ffc-accent); }
.ffc-switch input:checked + .ffc-slider::after { transform: translateX(22px); }
.ffc-switch input:focus-visible + .ffc-slider { outline: 3px solid #fff; }

/* Dettagli / tabella */
.ffc-details { margin-top: 8px; border-top: 1px solid var(--ffc-line); padding-top: 12px; }
.ffc-details summary { cursor: pointer; font-weight: 700; color: var(--ffc-accent); padding: 4px 0; }
.ffc-details summary:hover { color: var(--ffc-accent-hover); }
.ffc-details-body { padding-top: 10px; }
.ffc-tablewrap { overflow-x: auto; border: 1px solid var(--ffc-line); border-radius: 10px; }
.ffc-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 540px; }
.ffc-table th,
.ffc-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ffc-line); }
.ffc-table th { background: var(--ffc-bg-2); color: #fff; font-weight: 700; }
.ffc-table tr:last-child td { border-bottom: 0; }
.ffc-table code { color: #ffd2c0; font-size: 0.92em; white-space: nowrap; }

.ffc-p-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--ffc-line);
  background: var(--ffc-bg);
}

html.ffc-lock { overflow: hidden; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .ffc-banner {
    grid-template-columns: 1fr;
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 18px 16px 16px;
    gap: 14px;
  }
  .ffc-b-body { padding-right: 34px; }
  .ffc-actions { min-width: 0; }
  .ffc-panel { max-height: 94vh; border-radius: 16px; }
  .ffc-p-head { padding: 14px 12px 10px 18px; }
  .ffc-scroll { padding: 14px 18px; }
  .ffc-p-foot { flex-direction: column; padding: 12px 18px 16px; }
  .ffc-p-foot .ffc-btn { width: 100%; }
  .ffc-cat { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ffc-banner, .ffc-overlay, .ffc-slider, .ffc-slider::after, .ffc-btn { transition: none; }
}

/* Titoli e pulsanti nello stesso carattere del brand */
.ffc-title, .ffc-h3, .ffc-cat-title, .ffc-btn, .ffc-always, .ffc-details summary {
  font-family: "Outfit", "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
