/**
 * GDPR Cookie Consent Banner Styles
 * CalorieCalculator.uk
 */

#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

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

.cc-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

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

.cc-text h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #1e293b;
}

.cc-text p {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
}

.cc-link {
  color: #6366f1;
  font-size: 0.85rem;
  text-decoration: none;
}

.cc-link:hover {
  text-decoration: underline;
}

.cc-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cc-btn--primary {
  background: #6366f1;
  color: white;
}

.cc-btn--primary:hover {
  background: #4f46e5;
}

.cc-btn--secondary {
  background: #e2e8f0;
  color: #334155;
}

.cc-btn--secondary:hover {
  background: #cbd5e1;
}

.cc-btn--text {
  background: transparent;
  color: #6366f1;
  padding: 12px 16px;
}

.cc-btn--text:hover {
  background: #f1f5f9;
}

/* Preferences Panel */
.cc-preferences {
  max-width: 500px;
  margin: 20px auto 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
}

.cc-pref-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cc-pref-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #1e293b;
}

.cc-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.cc-close:hover {
  color: #334155;
}

.cc-pref-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
}

.cc-option input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
}

.cc-option input:disabled {
  opacity: 0.7;
}

.cc-option-text {
  flex: 1;
}

.cc-option-text strong {
  display: block;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 2px;
}

.cc-option-text small {
  font-size: 0.8rem;
  color: #64748b;
}

.cc-pref-buttons {
  margin-top: 16px;
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  #cookie-consent-banner {
    padding: 16px;
  }

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

  .cc-buttons {
    flex-direction: column;
  }

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