/*
 * Banner cookie di fornarolipaper.com — stili.
 * Tutti i selettori partono da #fc-cc per non subire gli stili del tema Enfold.
 * Colori del sito: arancione #f05a1a (bottoni), marrone #443f3a (footer).
 */

#fc-cc,
#fc-cc * {
  box-sizing: border-box;
}

#fc-cc {
  font-family: "Open Sans", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  -webkit-text-size-adjust: 100%;
}

#fc-cc [hidden] {
  display: none !important;
}

#fc-cc p {
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
}

#fc-cc p:last-child {
  margin-bottom: 0;
}

#fc-cc a {
  color: #d03808;
  text-decoration: underline;
  font-weight: 600;
}

#fc-cc a:hover,
#fc-cc a:focus {
  color: #f05a1a;
}

#fc-cc .fc-title {
  margin: 0 0 8px;
  padding: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #222;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- bottoni ---------- */

#fc-cc .fc-btn {
  display: inline-block;
  margin: 0;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  -webkit-appearance: none;
  appearance: none;
}

#fc-cc .fc-btn--primary {
  background: #f05a1a;
  border-color: #d03808;
  color: #fff;
}

#fc-cc .fc-btn--primary:hover,
#fc-cc .fc-btn--primary:focus {
  background: #d94e14;
  border-color: #b83006;
  color: #fff;
}

#fc-cc .fc-btn--outline {
  background: #fff;
  border-color: #bdbdbd;
  color: #333;
}

#fc-cc .fc-btn--outline:hover,
#fc-cc .fc-btn--outline:focus {
  background: #f3f1ec;
  border-color: #8a8a8a;
  color: #222;
}

#fc-cc .fc-btn:focus-visible,
#fc-cc .fc-close:focus-visible,
#fc-cc a:focus-visible,
#fc-cc summary:focus-visible {
  outline: 2px solid #f05a1a;
  outline-offset: 2px;
}

#fc-cc .fc-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
}

#fc-cc .fc-close:hover,
#fc-cc .fc-close:focus {
  background: #f3f1ec;
  color: #222;
}

/* ---------- banner ---------- */

#fc-cc .fc-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 2147483000;
  width: calc(100% - 32px);
  max-width: 1040px;
  padding: 22px 28px;
  transform: translateX(-50%);
  background: #fff;
  color: #333;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
  outline: none;
  animation: fc-rise .3s ease-out;
}

#fc-cc .fc-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  padding-right: 24px;
}

#fc-cc .fc-banner__text {
  flex: 1 1 440px;
  min-width: 0;
}

#fc-cc .fc-banner__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@keyframes fc-rise {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- pannello preferenze ---------- */

html.fc-lock,
html.fc-lock body {
  overflow: hidden !important;
}

#fc-cc .fc-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .55);
}

#fc-cc .fc-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  outline: none;
  overflow: hidden;
}

#fc-cc .fc-modal__header {
  padding: 20px 60px 12px 24px;
  border-bottom: 1px solid #e6e3dd;
}

#fc-cc .fc-modal__header .fc-title {
  margin: 0;
}

#fc-cc .fc-modal__header .fc-close {
  top: 14px;
  right: 14px;
}

#fc-cc .fc-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 24px;
  -webkit-overflow-scrolling: touch;
}

#fc-cc .fc-modal__intro {
  margin-bottom: 18px;
}

#fc-cc .fc-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid #e6e3dd;
  background: #faf9f7;
}

#fc-cc .fc-cat {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #e6e3dd;
  border-radius: 6px;
  background: #fff;
}

#fc-cc .fc-cat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#fc-cc .fc-cat__text {
  flex: 1 1 auto;
  min-width: 0;
}

#fc-cc .fc-cat__title {
  margin: 0 0 4px;
  padding: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #222;
  text-transform: none;
  letter-spacing: 0;
}

#fc-cc .fc-cat__desc {
  margin: 0;
  font-size: 13px;
  color: #555;
}

/* interruttore */

#fc-cc .fc-switch-wrap {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}

#fc-cc .fc-switch {
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #c4c0ba;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color .2s;
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
}

#fc-cc .fc-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .2s;
}

#fc-cc .fc-switch:checked {
  background: #f05a1a;
}

#fc-cc .fc-switch:checked::after {
  transform: translateX(20px);
}

#fc-cc .fc-switch:disabled {
  opacity: .55;
  cursor: not-allowed;
}

#fc-cc .fc-switch:focus-visible {
  outline: 2px solid #f05a1a;
  outline-offset: 2px;
}

/* dettagli cookie */

#fc-cc .fc-details {
  margin-top: 10px;
  font-size: 13px;
}

#fc-cc .fc-details summary {
  display: list-item;
  cursor: pointer;
  color: #d03808;
  font-weight: 600;
}

#fc-cc .fc-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

#fc-cc .fc-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.4;
}

#fc-cc .fc-table th,
#fc-cc .fc-table td {
  padding: 6px 8px;
  border: 1px solid #e6e3dd;
  text-align: left;
  vertical-align: top;
  color: #333;
  background: transparent;
}

#fc-cc .fc-table th {
  background: #f3f1ec;
  font-weight: 700;
}

#fc-cc .fc-table code {
  font-family: Menlo, Consolas, monospace;
  font-size: 12px;
  background: transparent;
  padding: 0;
  color: #222;
}

#fc-cc .fc-links {
  margin-top: 6px;
  font-size: 13px;
}

/* ---------- schermi piccoli ---------- */

@media (max-width: 640px) {
  #fc-cc .fc-banner {
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    padding: 20px 16px 16px;
    transform: none;
    border-radius: 10px 10px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  @keyframes fc-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  #fc-cc .fc-banner__inner {
    padding-right: 0;
  }

  #fc-cc .fc-banner__actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  #fc-cc .fc-btn {
    width: 100%;
    white-space: normal;
  }

  #fc-cc .fc-overlay {
    padding: 0;
    align-items: flex-end;
  }

  #fc-cc .fc-modal {
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 10px 10px 0 0;
  }

  #fc-cc .fc-modal__footer {
    flex-direction: column-reverse;
  }

  #fc-cc .fc-cat__head {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fc-cc .fc-banner {
    animation: none;
  }
  #fc-cc .fc-switch,
  #fc-cc .fc-switch::after,
  #fc-cc .fc-btn {
    transition: none;
  }
}
