/* ============================================
   Cookie Consent — Banner & Settings Modal
   Dark theme version
   ============================================ */

/* ---- Overlay (behind settings modal) ---- */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.cookie-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(17, 21, 30, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease;
}

.cookie-banner.active {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.cookie-banner__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 87, 184, 0.12);
  border-radius: 12px;
}

.cookie-banner__icon svg {
  width: 22px;
  height: 22px;
  stroke: #4d9ee8;
  fill: none;
  stroke-width: 1.5;
}

.cookie-banner__content {
  flex: 1;
  min-width: 0;
}

.cookie-banner__title {
  font-size: 15px;
  font-weight: 600;
  color: #f5f7fa;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.cookie-banner__text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  max-width: 60ch;
}

.cookie-banner__text a {
  color: #4d9ee8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cookie-banner__text a:hover {
  color: #78b8f0;
  text-decoration: underline;
}

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

/* Banner Buttons */
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cookie-btn--accept {
  background: #0057b8;
  color: #ffffff;
}

.cookie-btn--accept:hover {
  background: #0066d6;
  box-shadow: 0 4px 16px rgba(0, 87, 184, 0.35);
}

.cookie-btn--deny {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-btn--deny:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.cookie-btn--settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  padding: 10px 14px;
  font-weight: 500;
}

.cookie-btn--settings:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

/* ---- Cookie Settings Modal ---- */
.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 99999;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  background: rgba(20, 24, 34, 0.97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5),
              0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.cookie-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal Header */
.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: #f5f7fa;
  letter-spacing: 0.01em;
}

.cookie-modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cookie-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cookie-modal__close svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2;
}

/* Modal Body */
.cookie-modal__body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
}

.cookie-modal__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Cookie Category */
.cookie-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.cookie-category:last-child {
  margin-bottom: 0;
}

.cookie-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-category__info {
  flex: 1;
  min-width: 0;
}

.cookie-category__name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3px;
}

.cookie-category__desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: #0057b8;
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(20px);
  background: #ffffff;
}

.cookie-toggle input:disabled + .cookie-toggle__slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle input:disabled:checked + .cookie-toggle__slider {
  background: rgba(0, 87, 184, 0.5);
  opacity: 1;
}

.cookie-category__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(0, 87, 184, 0.9);
  background: rgba(0, 87, 184, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 6px;
}

/* Modal Footer */
.cookie-modal__footer {
  display: flex;
  gap: 10px;
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-modal__footer .cookie-btn {
  flex: 1;
}

.cookie-btn--save {
  background: #0057b8;
  color: #ffffff;
}

.cookie-btn--save:hover {
  background: #0066d6;
  box-shadow: 0 4px 16px rgba(0, 87, 184, 0.35);
}

.cookie-btn--accept-all {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-btn--accept-all:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 20px 24px;
    gap: 16px;
  }

  .cookie-banner__icon {
    display: none;
  }

  .cookie-banner__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .cookie-btn--accept,
  .cookie-btn--deny {
    flex: 1;
    min-width: 0;
  }

  .cookie-btn--settings {
    width: 100%;
    text-align: center;
  }

  .cookie-modal {
    width: 95%;
    max-height: 90vh;
  }

  .cookie-modal__header {
    padding: 20px 20px 14px;
  }

  .cookie-modal__body {
    padding: 16px 20px;
  }

  .cookie-modal__footer {
    padding: 14px 20px 20px;
    flex-direction: column;
  }
}
