/* Banner cookie KeTrip. Sopra l'header (z-index fisso 997) e il resto della pagina. */
.ck-banner,
.ck-modal,
.ck-panel {
  font-family: Poppins, "Roboto", Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.ck-banner[hidden],
.ck-modal[hidden] {
  display: none !important;
}

/* Card flottante centrata in basso (non ancorata): non occupa tutta la larghezza e non sposta la pagina */
.ck-banner {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 820px;
  z-index: 20000;
  background: rgba(23, 23, 23, 0.98);
  color: #f4f7f2;
  border: 1px solid rgba(106, 189, 69, 0.4);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  padding: 20px;
}

.ck-inner {
  width: 100%;
  margin: 0;
}

.ck-banner h2,
.ck-panel h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  padding: 0;
  color: #6abd45;
  text-align: left;
}

.ck-banner p,
.ck-panel p {
  margin: 0;
  color: #e4ecd9;
  font-size: 0.95rem;
  text-align: left;
}

.ck-banner a,
.ck-panel a {
  color: #8fd36a;
  text-decoration: none;
}

.ck-banner a:hover,
.ck-panel a:hover {
  text-decoration: underline;
}

.ck-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ck-actions button {
  flex: 1 1 140px;
  min-height: 46px;
  padding: 10px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.25;
}

.ck-btn-reject {
  background: #f4f7ff;
  color: #171717;
  border: 1px solid #f4f7ff;
}

.ck-btn-custom {
  background: transparent;
  color: #f4f7f2;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.ck-btn-accept {
  background: #6abd45;
  color: #fff;
  border: 1px solid #6abd45;
}

.ck-actions button:hover {
  filter: brightness(1.06);
}

.ck-banner :focus-visible,
.ck-panel :focus-visible {
  outline: 2px solid #8fd36a;
  outline-offset: 2px;
}

.ck-modal {
  position: fixed;
  inset: 0;
  z-index: 20100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 0;
}

.ck-panel {
  width: min(680px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #171717;
  color: #f4f7f2;
  border: 1px solid rgba(106, 189, 69, 0.35);
  border-radius: 16px 16px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.4);
}

.ck-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ck-panel-head h2 {
  margin: 0;
}

.ck-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7f2;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.ck-lead {
  margin-bottom: 14px !important;
}

.ck-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ck-cat h3 {
  margin: 0 0 4px;
  padding: 0;
  font-size: 1rem;
  color: #f4f7f2;
  text-align: left;
}

.ck-cat p {
  font-size: 0.9rem;
}

.ck-cookies {
  display: block;
  margin-top: 6px;
  color: #c5d4bc;
  font-size: 0.82rem;
}

.ck-badge {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(106, 189, 69, 0.2);
  color: #b6e986;
  font-size: 0.78rem;
  font-weight: 700;
}

.ck-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  margin-top: 2px;
}

.ck-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.ck-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3d3d3d;
  pointer-events: none;
  transition: background 0.15s ease;
}

.ck-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.ck-switch input:checked + i {
  background: #6abd45;
}

.ck-switch input:checked + i::after {
  transform: translateX(20px);
}

.ck-switch input:focus-visible + i {
  outline: 2px solid #8fd36a;
  outline-offset: 2px;
}

.ck-note {
  margin: 4px 0 0 !important;
  color: #c5d4bc !important;
  font-size: 0.85rem !important;
}

body.ck-modal-open {
  overflow: hidden;
}

/* Link "Gestisci i cookie" nel footer: aspetto identico agli altri link dei documenti */
.footer .footer-content .footer-links ul .footer-cookie-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  text-align: left;
  transition: 0.3s;
}

.footer .footer-content .footer-links ul .footer-cookie-btn:hover {
  color: #fff;
}

@media (min-width: 720px) {
  .ck-modal {
    align-items: center;
    padding: 24px;
  }

  .ck-panel {
    border-radius: 16px;
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .ck-banner {
    width: calc(100% - 16px);
    bottom: calc(8px + env(safe-area-inset-bottom));
    padding: 16px;
    max-height: 85vh;
    overflow: auto;
  }

  .ck-actions {
    flex-direction: column;
  }

  .ck-actions button {
    width: 100%;
    flex-basis: auto;
  }
}
