/**
 * TwinsRealEstate Cookie Consent Styling
 * 
 * Provides styling for all cookie consent related components
 * including the banner, preferences page, and cookies information page.
 */

/* ===== COMMON STYLES ===== */
/* 
 * Cookie consent styles - isolated from page-specific CSS
 * Uses hardcoded values to prevent inheritance from renovation CSS variables
 */
:root {
  /* Colors - Light Mode
   * Use hardcoded values to ensure consistency across all pages
   * This prevents renovation CSS from affecting cookie modal buttons
   */
  --consent-primary-color: #0c2340; /* Global primary color (navy blue) - hardcoded */
  --consent-primary-dark: #061628; /* Darker navy for hover states */
  --consent-primary-rgb: 12, 35, 64; /* RGB values for rgba() */
  --consent-accent-color: #d4af37; /* Global accent color (gold) */
  --consent-bg-color: #ffffff;
  --consent-bg-secondary: #f8f9fa;
  --consent-bg-tertiary: #eaeaea;
  --consent-text-primary: #111827;
  --consent-text-secondary: #6b7280;
  --consent-border-color: #e5e7eb;
  --consent-success-color: #10b981;
  --consent-success-bg: #d1fae5;
  --consent-error-color: #ef4444;
  --consent-error-bg: #fee2e2;
  --consent-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);

  /* Transitions */
  --consent-transition: all 0.3s ease;
}

/* Override with global variables if available, but maintain hardcoded fallbacks */
:root {
  /* Use global variables with fallbacks - ensures consistency */
  --consent-primary-color: var(--primary-color, #0c2340);
  --consent-primary-dark: #061628;
  --consent-accent-color: var(--accent-color, #d4af37);
  --consent-bg-color: var(--color-background, #ffffff);
  --consent-bg-secondary: var(--color-background-secondary, #f8f9fa);
  --consent-bg-tertiary: var(--color-background-tertiary, #eaeaea);
  --consent-text-primary: var(--color-text-primary, #111827);
  --consent-text-secondary: var(--color-text-secondary, #6b7280);
  --consent-border-color: var(--color-border, #e5e7eb);
}

/* Dark Mode Variables */
html.dark-mode {
  --consent-bg-color: var(--color-dark-bg, #1f1f1f);
  --consent-bg-secondary: var(--color-dark-bg-secondary, #2d2d2d);
  --consent-bg-tertiary: var(--color-dark-bg-tertiary, #3d3d3d);
  --consent-text-primary: var(--color-dark-text, #ffffff);
  --consent-text-secondary: var(--color-dark-text-secondary, #bbbbbb);
  --consent-border-color: var(--color-dark-border, #444444);
  --consent-success-color: var(--color-success-dark, #81c784);
  --consent-success-bg: rgba(46, 125, 50, 0.2);
  --consent-error-color: var(--color-error-dark, #ef5350);
  --consent-error-bg: rgba(211, 47, 47, 0.2);
  --consent-shadow: var(--shadow-dark-md, 0 4px 6px rgba(0, 0, 0, 0.3));
}

/* ===== COOKIE CONSENT BANNER - PREMIUM UI/UX DESIGN ===== */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-in-out;
  color: var(--consent-text-primary);
  background-color: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  opacity: 1;
  transform: translateY(0);
}

.cookie-consent-banner.hidden {
  display: none;
  opacity: 0;
  transform: translateY(100%);
}

/* Ultra-black dark mode */
[data-theme="dark"] .cookie-consent-banner,
html.dark-mode .cookie-consent-banner {
  background-color: rgba(0, 0, 0, 0.98);
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.8);
}

.cookie-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.banner-content {
  border-radius: 16px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Ultra-black dark mode for banner content */
[data-theme="dark"] .banner-content,
html.dark-mode .banner-content {
  background-color: #0a0a0a !important; /* Ultra-black */
  border-color: #2a2a2a !important; /* Ultra-black border */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9) !important;
}

.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--consent-border-color);
  background: linear-gradient(135deg, rgba(12, 35, 64, 0.02) 0%, rgba(12, 35, 64, 0.05) 100%);
}

[data-theme="dark"] .banner-header,
html.dark-mode .banner-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.banner-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--consent-text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.banner-title::before {
  content: '🍪';
  font-size: 1.25rem;
  filter: grayscale(0.2);
}

[data-theme="dark"] .banner-title,
html.dark-mode .banner-title {
  color: #ffffff;
}

.banner-close {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--consent-text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

[data-theme="dark"] .banner-close,
html.dark-mode .banner-close {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.banner-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--consent-text-primary);
  transform: scale(1.1) rotate(90deg);
}

[data-theme="dark"] .banner-close:hover,
html.dark-mode .banner-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.banner-body {
  padding: 1.5rem 2rem;
}

.banner-body p {
  margin: 0 0 1.25rem;
  line-height: 1.7;
  color: var(--consent-text-secondary);
  font-size: 0.95rem;
}

[data-theme="dark"] .banner-body p,
html.dark-mode .banner-body p {
  color: rgba(255, 255, 255, 0.85);
}

.essential-notice {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(12, 35, 64, 0.08) 0%, rgba(12, 35, 64, 0.05) 100%);
  border-radius: 10px;
  margin-bottom: 1rem;
  border-left: 3px solid var(--consent-accent-color, #d4af37);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

[data-theme="dark"] .essential-notice,
html.dark-mode .essential-notice {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
  border-left-color: var(--consent-accent-color, #d4af37);
}

.essential-notice::before {
  content: 'ℹ️';
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.essential-notice p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.essential-notice strong {
  color: var(--consent-text-primary);
  font-weight: 600;
}

[data-theme="dark"] .essential-notice strong,
html.dark-mode .essential-notice strong {
  color: #ffffff;
}

.banner-footer {
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid var(--consent-border-color);
  background: linear-gradient(135deg, rgba(12, 35, 64, 0.02) 0%, rgba(12, 35, 64, 0.05) 100%);
}

[data-theme="dark"] .banner-footer,
html.dark-mode .banner-footer {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-top-color: rgba(255, 255, 255, 0.1);
}

.banner-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.banner-link {
  color: var(--consent-accent-color, #d4af37);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 0.25rem 0;
}

.banner-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--consent-accent-color, #d4af37);
  transition: width 0.3s ease;
}

.banner-link:hover {
  color: var(--consent-primary-color, #0c2340);
  text-decoration: none;
}

.banner-link:hover::after {
  width: 100%;
}

[data-theme="dark"] .banner-link,
html.dark-mode .banner-link {
  color: var(--consent-accent-color, #d4af37);
}

[data-theme="dark"] .banner-link:hover,
html.dark-mode .banner-link:hover {
  color: #ffffff;
}

.banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
}

.banner-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

.banner-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.banner-btn:hover::before {
  width: 300px;
  height: 300px;
}

.banner-btn > * {
  position: relative;
  z-index: 1;
}

.banner-btn-primary {
  background: linear-gradient(135deg, var(--consent-primary-color, #0c2340) 0%, #1a3a5c 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(12, 35, 64, 0.3);
}

.banner-btn-primary:hover {
  background: linear-gradient(135deg, #061628 0%, var(--consent-primary-color, #0c2340) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(12, 35, 64, 0.4);
}

/* Dark mode primary button */
[data-theme="dark"] .banner-btn-primary,
html.dark-mode .banner-btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b49225 100%) !important;
  color: #000000 !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4) !important;
}

[data-theme="dark"] .banner-btn-primary:hover,
html.dark-mode .banner-btn-primary:hover {
  background: linear-gradient(135deg, #e9d38b 0%, #d4af37 100%) !important;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5) !important;
}

.banner-btn-secondary {
  background-color: var(--consent-bg-secondary);
  color: var(--consent-text-primary);
  border: 2px solid var(--consent-border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.banner-btn-secondary:hover {
  background-color: var(--consent-bg-tertiary);
  border-color: var(--consent-primary-color);
  color: var(--consent-primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Dark mode secondary button */
[data-theme="dark"] .banner-btn-secondary,
html.dark-mode .banner-btn-secondary {
  background-color: #0a0a0a !important;
  color: #ffffff !important;
  border-color: #2a2a2a !important;
}

[data-theme="dark"] .banner-btn-secondary:hover,
html.dark-mode .banner-btn-secondary:hover {
  background-color: #121212 !important;
  border-color: #d4af37 !important;
  color: #d4af37 !important;
}

/* ===== PREFERENCES PAGE ===== */
/* Modern BEM-based cookie preferences styling with design system tokens */

.cookie-preferences {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.cookie-preferences__header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.cookie-preferences__header-content {
  max-width: 700px;
  margin: 0 auto;
}

.cookie-preferences__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--consent-text-primary, var(--color-text-primary, #111827));
  margin: 0 0 1rem 0;
}

.cookie-preferences__title i {
  color: var(--consent-accent-color, var(--color-accent, #d4af37));
  font-size: 2rem;
}

.cookie-preferences__subtitle {
  color: var(--consent-text-secondary, var(--color-text-secondary, #6b7280));
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-preferences__status-message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 0 auto 2rem;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.5s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  font-size: 0.9375rem;
}

.cookie-preferences__status-message:empty {
  display: none;
}

.cookie-preferences__status-message.status-success {
  background-color: var(--consent-success-bg, var(--color-success-light, #d1fae5));
  color: var(--consent-success-color, var(--color-success, #10b981));
  border-left: 4px solid var(--consent-success-color, var(--color-success, #10b981));
}

.cookie-preferences__status-message.status-error {
  background-color: var(--consent-error-bg, var(--color-error-light, #fee2e2));
  color: var(--consent-error-color, var(--color-error, #ef4444));
  border-left: 4px solid var(--consent-error-color, var(--color-error, #ef4444));
}

.cookie-preferences__form {
  background-color: var(--consent-bg-color, var(--color-background, #ffffff));
  border-radius: 12px;
  box-shadow: var(--consent-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));
  overflow: hidden;
  border: 1px solid var(--consent-border-color, var(--color-border, #e5e7eb));
}

.cookie-preferences__category {
  padding: 2rem;
  border-bottom: 1px solid var(--consent-border-color, var(--color-border, #e5e7eb));
  transition: background-color 0.2s;
}

.cookie-preferences__category:last-of-type {
  border-bottom: none;
}

.cookie-preferences__category:hover {
  background-color: var(--consent-bg-secondary, var(--color-background-secondary, #f9fafb));
}

.cookie-preferences__category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

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

.cookie-preferences__category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--consent-text-primary, var(--color-text-primary, #111827));
  margin: 0 0 0.75rem 0;
}

.cookie-preferences__category-title i {
  color: var(--consent-primary-color, var(--color-primary, #0c2340));
  font-size: 1.125rem;
}

.cookie-preferences__category-description {
  color: var(--consent-text-secondary, var(--color-text-secondary, #6b7280));
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-preferences__toggle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.cookie-preferences__toggle {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px;
  cursor: pointer;
}

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

.cookie-preferences__toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--consent-bg-tertiary, var(--color-gray-300, #d1d5db));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 32px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-preferences__toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-preferences__toggle input:checked + .cookie-preferences__toggle-slider {
  background-color: var(--consent-primary-color, var(--color-primary, #0c2340));
}

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

.cookie-preferences__toggle input:disabled + .cookie-preferences__toggle-slider {
  background-color: var(--consent-primary-color, var(--color-primary, #0c2340));
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-preferences__toggle--disabled {
  cursor: not-allowed;
}

.cookie-preferences__toggle-label {
  font-size: 0.75rem;
  color: var(--consent-text-secondary, var(--color-text-secondary, #6b7280));
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-preferences__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background-color: var(--consent-bg-secondary, var(--color-background-secondary, #f9fafb));
  border-top: 1px solid var(--consent-border-color, var(--color-border, #e5e7eb));
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cookie-preferences__policy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--consent-accent-color, var(--color-accent, #d4af37));
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s;
}

.cookie-preferences__policy-link:hover {
  color: var(--consent-primary-color, var(--color-primary, #0c2340));
  text-decoration: underline;
}

.cookie-preferences__buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

.cookie-preferences__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
  white-space: nowrap;
}

.cookie-preferences__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-preferences__btn--primary {
  background-color: var(--consent-primary-color, var(--color-primary, #0c2340));
  color: white;
  box-shadow: 0 2px 8px rgba(12, 35, 64, 0.25);
}

.cookie-preferences__btn--primary:hover:not(:disabled) {
  background-color: var(--consent-primary-dark, var(--color-primary-dark, #061628));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(12, 35, 64, 0.35);
}

.cookie-preferences__btn--secondary {
  background-color: var(--consent-bg-color, var(--color-background, #ffffff));
  color: var(--consent-text-primary, var(--color-text-primary, #111827));
  border: 1px solid var(--consent-border-color, var(--color-border, #e5e7eb));
}

.cookie-preferences__btn--secondary:hover:not(:disabled) {
  background-color: var(--consent-bg-secondary, var(--color-background-secondary, #f9fafb));
  border-color: var(--consent-primary-color, var(--color-primary, #0c2340));
  color: var(--consent-primary-color, var(--color-primary, #0c2340));
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Legacy class support for backward compatibility */
.preferences-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.preferences-header {
  margin-bottom: 2rem;
  text-align: center;
}

.preferences-form {
  background-color: var(--consent-bg-color);
  border-radius: 8px;
  box-shadow: var(--consent-shadow);
  overflow: hidden;
}

.form-group {
  padding: 1.5rem;
  border-bottom: 1px solid var(--consent-border-color);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--consent-bg-secondary);
  border-top: 1px solid var(--consent-border-color);
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.cookie-policy-link {
  color: var(--consent-accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

.pref-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

.pref-btn-primary {
  background-color: var(--consent-primary-color, #0c2340);
  color: white;
  box-shadow: 0 2px 5px rgba(12, 35, 64, 0.3);
}

.pref-btn-primary:hover {
  background-color: var(--consent-primary-dark, #061628);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(12, 35, 64, 0.4);
}

.pref-btn-secondary {
  background-color: var(--consent-bg-secondary);
  color: var(--consent-text-primary);
  border: 1px solid var(--consent-border-color);
}

.pref-btn-secondary:hover {
  background-color: var(--consent-bg-tertiary);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.status-message {
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.5s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 1rem auto;
  font-size: 1rem;
}

.status-message:empty {
  display: none;
}

.status-message.status-success {
  background-color: var(--consent-success-bg);
  color: var(--consent-success-color);
  border-left: 4px solid var(--consent-success-color);
}

.status-message.status-error {
  background-color: var(--consent-error-bg);
  color: var(--consent-error-color);
  border-left: 4px solid var(--consent-error-color);
}

/* ===== COOKIES POLICY PAGE ===== */
.cookies-content {
  color: var(--consent-text-primary);
  max-width: 900px;
  margin: 0 auto;
}

.cookies-content h1,
.cookies-content h2,
.cookies-content h3,
.cookies-content h4 {
  color: var(--consent-text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.cookies-content h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.cookies-content h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid var(--consent-border-color);
  padding-bottom: 0.5rem;
}

.cookies-content p,
.cookies-content li {
  color: var(--consent-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.cookies-content a {
  color: var(--consent-accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

.cookies-content a:hover {
  text-decoration: underline;
  color: var(--consent-primary-color);
}

.cookies-card {
  background-color: var(--consent-bg-color);
  color: var(--consent-text-primary);
  border: 1px solid var(--consent-border-color);
  border-radius: 8px;
  box-shadow: var(--consent-shadow);
  margin-bottom: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cookies-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

html.dark-mode .cookies-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.cookies-card-header {
  background-color: var(--consent-bg-secondary);
  color: var(--consent-text-primary);
  border-bottom: 1px solid var(--consent-border-color);
  padding: 1rem 1.5rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookies-card-body {
  background-color: var(--consent-bg-color);
  padding: 1.5rem;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.cookies-badge-primary {
  background-color: var(--consent-primary-color);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
}

.cookies-badge-secondary {
  background-color: var(--consent-text-secondary);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
}

.cookies-btn-primary {
  display: inline-block;
  background-color: var(--consent-primary-color, #0c2340); /* Navy blue - root cause fixed */
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--consent-transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.cookies-btn-primary:hover {
  background-color: var(--consent-primary-dark, #061628);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(12, 35, 64, 0.4);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== DARK MODE SUPPORT FOR PREFERENCES ===== */
[data-theme="dark"] .cookie-preferences__form,
html.dark-mode .cookie-preferences__form {
  background-color: var(--consent-bg-color, var(--color-dark-bg, #1f1f1f));
  border-color: var(--consent-border-color, var(--color-dark-border, #444444));
}

[data-theme="dark"] .cookie-preferences__category,
html.dark-mode .cookie-preferences__category {
  border-color: var(--consent-border-color, var(--color-dark-border, #444444));
}

[data-theme="dark"] .cookie-preferences__category:hover,
html.dark-mode .cookie-preferences__category:hover {
  background-color: var(--consent-bg-secondary, var(--color-dark-bg-secondary, #2d2d2d));
}

[data-theme="dark"] .cookie-preferences__actions,
html.dark-mode .cookie-preferences__actions {
  background-color: var(--consent-bg-secondary, var(--color-dark-bg-secondary, #2d2d2d));
  border-color: var(--consent-border-color, var(--color-dark-border, #444444));
}

[data-theme="dark"] .cookie-preferences__btn--secondary,
html.dark-mode .cookie-preferences__btn--secondary {
  background-color: var(--consent-bg-color, var(--color-dark-bg, #1f1f1f));
  border-color: var(--consent-border-color, var(--color-dark-border, #444444));
  color: var(--consent-text-primary, var(--color-dark-text, #ffffff));
}

[data-theme="dark"] .cookie-preferences__btn--secondary:hover:not(:disabled),
html.dark-mode .cookie-preferences__btn--secondary:hover:not(:disabled) {
  background-color: var(--consent-bg-secondary, var(--color-dark-bg-secondary, #2d2d2d));
  border-color: var(--consent-accent-color, var(--color-accent, #d4af37));
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .cookie-preferences {
    padding: 0 0.75rem;
  }

  .cookie-preferences__title {
    font-size: 1.75rem;
  }

  .cookie-preferences__category {
    padding: 1.5rem;
  }

  .cookie-preferences__category-header {
    flex-direction: column;
    gap: 1.5rem;
  }

  .cookie-preferences__toggle-wrapper {
    align-self: flex-start;
    flex-direction: row;
    gap: 0.75rem;
  }

  .cookie-preferences__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-preferences__policy-link {
    text-align: center;
    justify-content: center;
  }

  .cookie-preferences__buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookie-preferences__btn {
    width: 100%;
    justify-content: center;
  }

  .banner-footer,
  .form-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .banner-buttons,
  .action-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .cookies-content h1 {
    font-size: 1.8rem;
  }
  
  .cookies-content h2 {
    font-size: 1.5rem;
  }
  
  .cookies-card-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .cookie-consent-banner {
    top: 50%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 95%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-50%);
    border-radius: 12px;
  }
  
  .banner-btn {
    flex: 1 1 auto;
    min-width: 40%;
    margin: 0.25rem;
  }
  
  #consent-details-toggle {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 576px) {
  .cookie-preferences__title {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .cookie-preferences__title i {
    font-size: 1.5rem;
  }

  .cookie-preferences__category {
    padding: 1.25rem;
  }

  .cookie-preferences__category-title {
    font-size: 1.125rem;
  }

  .cookie-preferences__category-description {
    font-size: 0.875rem;
  }

  .cookie-preferences__btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .pref-btn,
  .banner-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 100%;
  }
  
  .action-buttons {
    flex-wrap: wrap;
  }
  
  .cookie-consent-banner {
    width: 100%;
    height: auto;
    max-height: 90vh;
    top: 5vh;
    transform: none;
    left: 0;
    right: 0;
    margin: 0 auto;
    border-radius: 12px;
  }
}

/* Hidden elements */
.hidden {
  display: none !important;
}

/* Consent form */
.consent-form {
  margin-top: 1rem;
  border-top: 1px solid var(--consent-border-color);
  padding-top: 1rem;
}

.cookie-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-option {
  display: flex;
  padding: 0.5rem;
  background-color: var(--consent-bg-secondary);
  border-radius: 4px;
  transition: background-color 0.2s;
}

.cookie-option:hover {
  background-color: var(--consent-bg-tertiary);
}

.cookie-checkbox {
  display: flex;
  align-items: center;
  min-width: 120px;
}

.cookie-checkbox input[type="checkbox"] {
  margin-right: 0.5rem;
}

.cookie-info {
  flex: 1;
}

.cookie-name {
  display: block;
  font-weight: 600;
  color: var(--consent-text-primary);
  margin-bottom: 0.25rem;
}

.cookie-description {
  font-size: 0.85rem;
  margin: 0;
  color: var(--consent-text-secondary);
}

/* Status message */
.consent-message {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  z-index: 10000;
}

.consent-message.visible {
  display: block;
  opacity: 1;
}

.consent-message.success {
  background-color: var(--consent-success-bg);
  color: var(--consent-success-color);
  border-left: 4px solid var(--consent-success-color);
}

.consent-message.error {
  background-color: var(--consent-error-bg);
  color: var(--consent-error-color);
  border-left: 4px solid var(--consent-error-color);
}

/* Fix for the cookie details panel positioning */
#consent-options {
  position: relative;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
  margin-top: 1rem;
  border-radius: 8px;
  background-color: var(--consent-bg-secondary);
}

#consent-options.hidden {
  max-height: 0;
}

#consent-options:not(.hidden) {
  max-height: 800px; /* Large enough to contain all content */
  padding: 1rem;
  border: 1px solid var(--consent-border-color);
}

/* Better styling for the details panel */
.cookie-options-panel {
  margin-top: 1rem;
  background-color: var(--consent-bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--consent-border-color);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.cookie-options-panel.hidden {
  display: none;
}

.cookie-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
} 