/* FewoSpezis cookie consent - brand colors: dark teal #04384C, green gradient
   #3CB145 -> #B5D13A (same as .btn-cta / .btn-submit elsewhere on the site) */

#cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  transform: translateY(110%);
  transition: transform 0.35s ease;
  padding: 16px;
  font-family: "Poppins", sans-serif;
}

/* Persistent access point to reopen the settings at any time - sits behind
   the banner while it's open (same bottom-left corner), revealed once the
   banner is dismissed. Mirrors #return-to-top's size/style on the opposite
   corner. */
#cookie-consent-gear {
  position: fixed;
  left: 20px;
  bottom: 30px;
  z-index: 99999;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #04384C;
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(4, 56, 76, 0.35);
  transition: all 0.3s ease;
}

#cookie-consent-gear:hover {
  background: #3CB145;
}

@media (max-width: 600px) {
  #cookie-consent-gear {
    left: 14px;
    bottom: 14px;
  }
}

#cookie-consent-banner.cc-visible {
  transform: translateY(0);
}

.cc-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(4, 56, 76, 0.2);
  border: 1px solid rgba(4, 56, 76, 0.08);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cc-banner-text {
  flex: 1 1 320px;
  margin: 0;
  color: #04384C;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cc-link {
  color: #3CB145;
  font-weight: 600;
  text-decoration: underline;
}

.cc-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.cc-btn {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: all ease 0.2s;
  white-space: nowrap;
  line-height: 1.2;
}

.cc-btn-primary {
  border: 2px solid transparent;
  background: linear-gradient(88deg, #3CB145 -4.22%, #B5D13A 119.42%);
  color: #fff;
}

.cc-btn-primary:hover {
  filter: brightness(0.95);
}

.cc-btn-secondary {
  border: 2px solid #04384C;
  background: #fff;
  color: #04384C;
}

.cc-btn-secondary:hover {
  background: #04384C;
  color: #fff;
}

.cc-btn-ghost {
  border: 2px solid transparent;
  background: transparent;
  color: #04384C;
  text-decoration: underline;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.cc-btn-ghost:hover {
  color: #3CB145;
}

/* ---------- settings modal ---------- */

#cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  font-family: "Poppins", sans-serif;
}

#cookie-consent-modal[hidden] {
  display: none;
}

.cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 56, 76, 0.55);
}

.cc-modal-card {
  position: relative;
  max-width: 480px;
  width: calc(100% - 32px);
  margin: 5vh auto;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(4, 56, 76, 0.35);
  padding: 28px;
}

.cc-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(4, 56, 76, 0.06);
  color: #04384C;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cc-modal-title {
  color: #04384C;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  padding-right: 2rem;
}

.cc-modal-intro {
  color: #52565e;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.cc-row {
  border-top: 1px solid rgba(4, 56, 76, 0.1);
  padding: 14px 0;
}

.cc-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-row-title {
  color: #04384C;
  font-weight: 600;
  font-size: 0.95rem;
}

.cc-always-on {
  color: #3CB145;
  font-weight: 500;
  font-size: 0.8rem;
}

.cc-row-desc {
  margin: 6px 0 0;
  color: #52565e;
  font-size: 0.825rem;
  line-height: 1.5;
}

.cc-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.cc-modal-actions .cc-btn {
  flex: 1 1 auto;
  text-align: center;
}

/* toggle switch */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-switch-track {
  position: absolute;
  inset: 0;
  background: #d7dbe0;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.cc-switch-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cc-switch input:checked + .cc-switch-track {
  background: #3CB145;
}

.cc-switch input:checked + .cc-switch-track::before {
  transform: translateX(18px);
}

.cc-switch input:disabled + .cc-switch-track {
  opacity: 0.6;
  cursor: not-allowed;
}

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

@media (max-width: 600px) {
  #cookie-consent-banner {
    padding: 10px;
  }

  .cc-banner-inner {
    padding: 16px;
    gap: 14px;
  }

  .cc-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cc-banner-actions .cc-btn {
    flex: 1 1 auto;
  }

  .cc-btn-ghost {
    flex: 0 0 auto;
    width: 100%;
    order: 3;
  }

  .cc-modal-card {
    padding: 22px;
    margin: 4vh auto;
  }
}
