.cookie-consent {
  position: fixed;
  z-index: 9999;
  inset: auto 0 0 0;
}

.cookie-consent[hidden],
.cookie-consent__banner[hidden],
.cookie-consent__overlay[hidden] {
  display: none;
}

.cookie-consent__banner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1100px;
  margin: 16px auto;
  padding: 22px 26px;
  background: #ffffff;
  border: 1px solid var(--border-grey);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  animation: cookie-consent-slide-up 0.35s ease;
}

@keyframes cookie-consent-slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-consent__text {
  flex: 1 1 380px;
  min-width: 260px;
}

.cookie-consent__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy-deep);
}

.cookie-consent__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.cookie-consent__desc a {
  color: var(--blue);
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 12px 20px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.cookie-consent__btn--primary {
  background: var(--navy);
  color: #fff;
}
.cookie-consent__btn--primary:hover { background: var(--navy-deep); }

.cookie-consent__btn--outline {
  background: transparent;
  border-color: var(--border-grey);
  color: var(--text-dark);
}
.cookie-consent__btn--outline:hover { background: var(--bg-grey); }

.cookie-consent__btn--link {
  background: transparent;
  border-color: transparent;
  color: var(--blue);
  padding: 12px 8px;
}
.cookie-consent__btn--link:hover { color: var(--navy-deep); text-decoration: underline; }

/* Manage modal */
.cookie-consent__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}

.cookie-consent__modal {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  animation: cookie-consent-slide-up 0.25s ease;
}

.cookie-consent__modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.cookie-consent__modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-deep);
}

.cookie-consent__close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 0;
}
.cookie-consent__close:hover { color: var(--text-dark); }

.cookie-consent__modal-desc {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.cookie-consent__category {
  padding: 16px 0;
  border-top: 1px solid var(--border-grey);
}

.cookie-consent__category-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cookie-consent__category-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.cookie-consent__category-desc {
  margin: 6px 0 0 62px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie-consent__modal-actions {
  margin-top: 24px;
}

.cookie-consent__modal-actions .cookie-consent__btn {
  width: 100%;
}

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

.cookie-consent__switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-consent__slider {
  position: absolute;
  inset: 0;
  background: var(--border-grey);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-consent__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 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.2);
}

.cookie-consent__switch input:checked + .cookie-consent__slider {
  background: var(--navy);
}

.cookie-consent__switch input:checked + .cookie-consent__slider::before {
  transform: translateX(18px);
}

.cookie-consent__switch input:disabled + .cookie-consent__slider {
  background: var(--navy);
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .cookie-consent__banner {
    margin: 0;
    border-radius: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__actions .cookie-consent__btn {
    width: 100%;
  }

  .cookie-consent__category-desc {
    margin-left: 0;
    margin-top: 8px;
  }
}
