/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 16px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__box {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(11, 15, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  position: relative;
}

.cookie-banner__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: rgba(233, 238, 247, 0.7);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 400;
}

.cookie-banner__close:hover {
  color: rgba(233, 238, 247, 0.95);
  background: rgba(255, 255, 255, 0.05);
}

.cookie-banner__content {
  padding-right: 32px;
}

.cookie-banner__title {
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 12px 0;
  color: rgba(233, 238, 247, 0.95);
  letter-spacing: -0.01em;
}

.cookie-banner__text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(233, 238, 247, 0.75);
  margin: 0 0 20px 0;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cookie-banner__actions .btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.cookie-banner__actions .btn-primary {
  background: linear-gradient(135deg, rgba(128, 90, 255, 0.95), rgba(176, 84, 255, 0.95));
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.cookie-banner__actions .btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.cookie-banner__actions .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(233, 238, 247, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
}

.cookie-banner__actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.cookie-banner__links {
  font-size: 13px;
  color: rgba(233, 238, 247, 0.6);
}

.cookie-banner__links a {
  color: rgba(128, 90, 255, 0.9);
  text-decoration: underline;
}

.cookie-banner__links a:hover {
  color: rgba(128, 90, 255, 1);
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal[hidden] {
  display: none !important;
}

.cookie-modal__box {
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(11, 15, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-modal__title {
  font-size: 24px;
  font-weight: 400;
  margin: 0;
  color: rgba(233, 238, 247, 0.95);
  letter-spacing: -0.01em;
}

.cookie-modal__close {
  background: transparent;
  border: none;
  color: rgba(233, 238, 247, 0.7);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 400;
}

.cookie-modal__close:hover {
  color: rgba(233, 238, 247, 0.95);
  background: rgba(255, 255, 255, 0.05);
}

.cookie-modal__body {
  padding: 24px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(233, 238, 247, 0.75);
}

.cookie-modal__options {
  padding: 0 24px;
}

.cookie-opt {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-opt:last-child {
  border-bottom: none;
}

.cookie-opt__left {
  flex: 1;
  padding-right: 20px;
}

.cookie-opt__name {
  font-size: 16px;
  font-weight: 400;
  color: rgba(233, 238, 247, 0.92);
  margin: 0 0 6px 0;
}

.cookie-opt__desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(233, 238, 247, 0.65);
  margin: 0;
}

.cookie-opt__right {
  flex-shrink: 0;
}

.cookie-opt__locked {
  font-size: 14px;
  color: rgba(233, 238, 247, 0.5);
  padding: 8px 12px;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 24px;
}

.switch__slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch input:checked + .switch__slider {
  background-color: rgba(128, 90, 255, 0.8);
}

.switch input:checked + .switch__slider:before {
  transform: translateX(24px);
}

.switch input:disabled + .switch__slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-modal__actions {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-modal__actions .btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.cookie-modal__actions .btn-primary {
  background: linear-gradient(135deg, rgba(128, 90, 255, 0.95), rgba(176, 84, 255, 0.95));
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.cookie-modal__actions .btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.cookie-modal__actions .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(233, 238, 247, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
}

.cookie-modal__actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-banner__box {
    padding: 20px;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn {
    width: 100%;
    text-align: center;
  }

  .cookie-modal__box {
    max-height: 95vh;
  }

  .cookie-modal__actions {
    flex-direction: column;
  }

  .cookie-modal__actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Mobile containment: anti-overflow */
@media (max-width: 480px) {
  .cookie-consent, .cookie-banner, .cookie-modal {
    max-width: 100%;
  }
  .cookie-banner {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }
  .cookie-banner__box {
    max-width: 100%;
  }
  .cookie-modal__box {
    max-width: calc(100% - 24px);
    margin: 0 12px;
  }
}

