/* Cookie banner + modal styles aligned with theme */

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

#cookie-banner.cookie-message {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100001;
  width: min(430px, calc(100vw - 32px));
  max-width: 430px;
  padding: 26px;
  background: linear-gradient(165deg, #232323 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.35);
}

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

#cookie-banner .cb__text a {
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

#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: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s 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: #ffffff !important;
  border-color: #ffffff !important;
  color: #232323 !important;
}

#cookie-banner .cb__btn--ghost {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.35) !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(21, 24, 29, 0.62);
  backdrop-filter: blur(3px);
}

#cookie-modal .cm__box {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
  padding: 28px;
}

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

#cookie-modal .cm__title {
  margin: 0;
  font-family: var(--alt-font);
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.15;
  color: var(--dark-gray);
  letter-spacing: -0.5px;
}

#cookie-modal .cm__x {
  width: 38px;
  height: 38px;
  border: 1px solid #d7d9dd;
  border-radius: 8px;
  background: #ffffff;
  color: #232323;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#cookie-modal .cm__text {
  color: var(--medium-gray);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 20px;
}

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

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

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

#cookie-modal .cm__row strong {
  display: block;
  color: var(--dark-gray);
  margin-bottom: 2px;
}

#cookie-modal .cm__muted {
  color: var(--medium-gray);
  font-size: 14px;
  line-height: 1.45;
}

#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: #c8cdd3;
  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: var(--dark-gray);
}

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

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

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

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

#cookie-modal .cm__buttons .cb__btn--primary {
  background: var(--dark-gray) !important;
  border-color: var(--dark-gray) !important;
  color: #ffffff !important;
}

#cookie-modal .cm__buttons .cb__btn--ghost {
  background: #f7f7f7 !important;
  border-color: #d7d9dd !important;
  color: var(--dark-gray) !important;
}

#cookie-modal .cm__footer {
  margin: 14px 0 0;
  color: var(--medium-gray);
  font-size: 14px;
}

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

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

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

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