/* Cookie Consent Banner - ChatGenius */

/* ========== Cookie Banner Container ========== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #18181b;
  border-top: 1px solid #27272a;
  padding: 1rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner.hidden {
  display: none;
}

/* ========== Layout ========== */
.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text h4 {
  color: #fafafa;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-banner-text p {
  color: #a1a1aa;
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

.cookie-banner-text a {
  color: #10b981;
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: #34d399;
}

/* ========== Buttons ========== */
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #10b981;
  color: #fff;
}

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

.cookie-btn-reject {
  background: transparent;
  color: #a1a1aa;
  border: 1px solid #3f3f46;
}

.cookie-btn-reject:hover {
  background: #27272a;
  color: #fafafa;
}

.cookie-btn-settings {
  background: transparent;
  color: #a1a1aa;
  border: 1px solid #3f3f46;
}

.cookie-btn-settings:hover {
  background: #27272a;
  color: #fafafa;
}

/* ========== Settings Modal ========== */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.cookie-modal {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 1rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.cookie-modal-overlay.visible .cookie-modal {
  transform: scale(1);
}

.cookie-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #27272a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h3 {
  color: #fafafa;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
}

.cookie-modal-close:hover {
  color: #fafafa;
}

.cookie-modal-body {
  padding: 1.5rem;
}

.cookie-modal-body > p {
  color: #a1a1aa;
  font-size: 0.875rem;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

/* ========== Cookie Categories ========== */
.cookie-category {
  padding: 1rem;
  background: #0f0f12;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

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

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

.cookie-category-header h4 {
  color: #fafafa;
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
}

.cookie-category-header span {
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 500;
}

.cookie-category p {
  color: #71717a;
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.5;
}

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

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #3f3f46;
  border-radius: 24px;
  transition: background 0.2s ease;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fafafa;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #10b981;
}

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

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

/* ========== Modal Footer ========== */
.cookie-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #27272a;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ========== Responsive ========== */
@media (max-width: 640px) {
  .cookie-banner {
    padding: 1rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

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