/* Cookie banner + modal styles */

#cookie-banner[hidden],
#cookie-modal[hidden] {
  display: none !important;
}

#cookie-banner.cookie-message {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100001;
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  padding: 24px;
  background: #1d2733;
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

#cookie-banner .cb__text {
  margin: 0 0 16px 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.65;
}

#cookie-banner .cb__text a {
  color: #9ed0ff;
  text-decoration: underline;
}

#cookie-banner .cb__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#cookie-banner .cb__buttons .cb__btn {
  margin: 0 !important;
  width: 100% !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#cookie-banner .cb__buttons .cb__btn:hover,
#cookie-banner .cb__buttons .cb__btn:focus-visible {
  transform: translateY(-1px);
}

#cookie-banner .cb__btn--primary {
  background: #2670c0 !important;
  border-color: #2670c0 !important;
  color: #ffffff !important;
}

#cookie-banner .cb__btn--ghost {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

#cookie-banner .cb__btn.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

#cookie-modal.cm {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(13, 22, 34, 0.58);
  backdrop-filter: blur(3px);
}

#cookie-modal .cm__box {
  width: min(700px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  padding: 24px;
}

#cookie-modal .cm__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

#cookie-modal .cm__title {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
  color: #333b45;
}

#cookie-modal .cm__x {
  width: 36px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#cookie-modal .cm__text {
  color: #39414d;
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 18px 0;
}

#cookie-modal .cm__group {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

#cookie-modal .cm__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}

#cookie-modal .cm__row:last-child {
  border-bottom: 0;
}

#cookie-modal .cm__row strong {
  display: block;
  color: #1f2937;
  margin-bottom: 2px;
}

#cookie-modal .cm__muted {
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}

#cookie-modal .cm__switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

#cookie-modal .cm__switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

#cookie-modal .cm__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

#cookie-modal .cm__slider::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

#cookie-modal .cm__switch input:checked + .cm__slider {
  background: #2670c0;
}

#cookie-modal .cm__switch input:checked + .cm__slider::before {
  transform: translateX(22px);
}

#cookie-modal .cm__switch--disabled .cm__slider {
  background: #9ca3af;
  cursor: not-allowed;
}

#cookie-modal .cm__buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

#cookie-modal .cm__buttons .btn {
  margin: 0 !important;
  min-height: 44px;
  width: 100% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
}

#cookie-modal .cm__buttons .cb__btn--primary {
  background: #2670c0 !important;
  border-color: #2670c0 !important;
  color: #ffffff !important;
}

#cookie-modal .cm__buttons .cb__btn--ghost {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

#cookie-modal .cm__footer {
  margin: 14px 0 0;
  color: #475569;
}

@media (max-width: 767px) {
  #cookie-banner.cookie-message {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 16px;
  }

  #cookie-modal.cm {
    align-items: flex-end;
    padding: 0;
  }

  #cookie-modal .cm__box {
    width: 100vw;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px 16px 16px;
  }

  #cookie-modal .cm__buttons {
    flex-direction: column;
  }
}
