/* 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: #0D1821;
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  border-top: 3px solid #BF4C22;
}

#cookie-banner .cb__text {
  margin: 0 0 16px 0;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  line-height: 1.65;
}

#cookie-banner .cb__text a {
  color: #e8845f;
  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: #BF4C22 !important;
  border-color: #BF4C22 !important;
  color: #ffffff !important;
}

#cookie-banner .cb__btn--primary:hover {
  background: #a83d1a !important;
  border-color: #a83d1a !important;
}

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

#cookie-banner .cb__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

#cookie-banner .cb__btn.is-active {
  box-shadow: 0 0 0 2px rgba(191, 76, 34, 0.5) inset;
}

/* Modal overlay */
#cookie-modal.cm {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(13, 24, 33, 0.65);
  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;
  border-top: 4px solid #BF4C22;
}

#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(22px, 4vw, 36px);
  line-height: 1.1;
  color: #0D1821;
}

#cookie-modal .cm__x {
  width: 36px;
  height: 36px;
  border: 1px solid #dde3e8;
  border-radius: 9px;
  background: #ffffff;
  color: #0D1821;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

#cookie-modal .cm__x:hover {
  background: #f5f5f5;
}

#cookie-modal .cm__text {
  color: #3d4a55;
  font-size: 15px;
  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: #0D1821;
  margin-bottom: 2px;
}

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

/* Toggle switch */
#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: #BF4C22;
}

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

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

/* Modal buttons */
#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: #BF4C22 !important;
  border-color: #BF4C22 !important;
  color: #ffffff !important;
}

#cookie-modal .cm__buttons .cb__btn--primary:hover {
  background: #a83d1a !important;
  border-color: #a83d1a !important;
}

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

#cookie-modal .cm__buttons .cb__btn--ghost:hover {
  background: #f0f0f0 !important;
}

#cookie-modal .cm__footer {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 13px;
}

/* Mobile */
@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;
  }
}
