/**
 * Cookie Consent Banner Styles
 * 符合 GDPR 的 Cookie 同意橫幅樣式
 */

/* Cookie Banner */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-background, #fff);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-consent-banner.fade-out {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-primary, #333);
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary, #666);
  line-height: 1.5;
}

.cookie-consent-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-consent-buttons .btn {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* 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;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.cookie-modal-content {
  position: relative;
  background: var(--card-background, #fff);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-modal-content h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: var(--text-primary, #333);
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
}

.cookie-category label {
  display: block;
  cursor: pointer;
}

.cookie-category input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
}

.cookie-category input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-category strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary, #333);
}

.cookie-category p {
  margin: 0.5rem 0 0 1.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  line-height: 1.4;
}

.cookie-modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cookie-modal-buttons .btn {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-buttons {
    flex-direction: column;
  }

  .cookie-consent-buttons .btn {
    width: 100%;
  }

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

  .cookie-modal-buttons {
    flex-direction: column;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #cookie-consent-banner {
    background: var(--card-background, #2a2a2a);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  }

  .cookie-consent-text h3 {
    color: var(--text-primary, #e0e0e0);
  }

  .cookie-consent-text p {
    color: var(--text-secondary, #b0b0b0);
  }

  .cookie-modal-content {
    background: var(--card-background, #2a2a2a);
  }

  .cookie-modal-content h2 {
    color: var(--text-primary, #e0e0e0);
  }

  .cookie-category {
    background: var(--bg-secondary, #1a1a1a);
  }

  .cookie-category strong {
    color: var(--text-primary, #e0e0e0);
  }

  .cookie-category p {
    color: var(--text-secondary, #b0b0b0);
  }
}
