/* === Cookie Consent Popup === */
.cookie-consent {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 9999;
  max-width: 480px;
  width: calc(100% - 48px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.cookie-consent.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cookie-consent.hide {
  transform: translateX(-50%) translateY(100px);
}

.cookie-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cookie-text {
  flex: 1;
}

.cookie-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 22px;
  color: var(--text);
  margin: 0 0 8px 0;
}

.cookie-desc {
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cookie-btn-accept {
  background: var(--primary);
  color: var(--primary-contrast);
  border: 1px solid var(--primary);
  min-width: 100px;
}

.cookie-btn-accept:hover {
  background: #0f1822;
}

.cookie-btn-manage {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  min-width: 100px;
  margin: 0 8px;
}

.cookie-btn-manage:hover {
  background: var(--bg);
}

.cookie-btn-decline {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  min-width: 100px;
}

.cookie-btn-decline:hover {
  background: var(--bg);
  color: var(--text);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .cookie-consent {
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: translateX(0);
    max-width: none;
    width: auto;
  }

  .cookie-consent.show {
    transform: translateY(0);
  }

  .cookie-consent.hide {
    transform: translateY(100px);
  }

  .cookie-content {
    padding: 20px;
  }

  .cookie-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .cookie-btn-accept,
  .cookie-btn-decline {
    width: 100%;
  }
}

/* Animation for slide up */
/* Cookie Settings Modal */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-settings-modal.show {
  opacity: 1;
  visibility: visible;
}

.cookie-settings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(1, 23, 44, 0.8);
  backdrop-filter: blur(4px);
}

.cookie-settings-content {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  width: calc(100% - 48px);
  max-height: 90vh;
  overflow-y: auto;
  margin: 24px;
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.cookie-settings-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 29px;
  color: var(--text);
  margin: 0;
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.cookie-settings-close:hover {
  background: var(--bg);
  color: var(--text);
}

.cookie-settings-body {
  padding: 24px;
}

.cookie-category {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

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

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cookie-category-title {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 22px;
  color: var(--text);
  margin: 0;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

.cookie-toggle-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 26px;
  transition: 0.3s;
}

.cookie-toggle-switch:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-switch {
  background: var(--primary);
}

.cookie-toggle input:checked + .cookie-toggle-switch:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-switch {
  background: #e0e0e0;
  cursor: not-allowed;
}

.cookie-category-desc {
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin: 0;
}

.cookie-settings-footer {
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cookie-settings-save {
  padding: 14px 32px;
  font-size: 16px;
}

@keyframes cookieSlideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.cookie-consent.show {
  animation: cookieSlideUp 0.3s ease-out;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .cookie-settings-content {
    width: calc(100% - 32px);
    margin: 16px;
    max-height: calc(100vh - 32px);
  }

  .cookie-settings-header,
  .cookie-settings-body,
  .cookie-settings-footer {
    padding: 20px;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-settings-title {
    font-size: 20px;
    line-height: 24px;
  }
}
