/* Cookie Consent Popup Styles */

.divinho-cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--divinho-z-modal, 9999);
  background: var(--divinho-white, #ffffff);
  border-top: 1px solid var(--divinho-gray-200, #e5e7eb);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 300ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.divinho-cookie-consent:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-consent-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--divinho-space-4, 1rem) var(--divinho-space-4, 1rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--divinho-space-4, 1rem);
  flex-wrap: wrap;
}

.cookie-consent-content {
  display: flex;
  align-items: flex-start;
  gap: var(--divinho-space-3, 0.75rem);
  flex: 1;
  min-width: 300px;
}

.cookie-consent-icon {
  flex-shrink: 0;
  color: var(--divinho-wine-primary, #722f37);
  margin-top: 2px;
}

.cookie-consent-text {
  flex: 1;
}

.cookie-consent-title {
  font-family: var(--divinho-font-serif, Georgia, serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--divinho-gray-900, #111827);
  margin: 0 0 var(--divinho-space-1, 0.25rem);
}

.cookie-consent-message {
  font-size: 0.8125rem;
  color: var(--divinho-gray-600, #4b5563);
  line-height: 1.5;
  margin: 0;
}

.cookie-consent-link {
  color: var(--divinho-wine-primary, #722f37);
  text-decoration: underline;
  font-weight: 500;
  transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent-link:hover {
  color: var(--divinho-wine-accent, #a0616a);
  text-decoration: underline;
}

.cookie-consent-link:focus {
  outline: 2px solid var(--divinho-wine-primary, #722f37);
  outline-offset: 2px;
  border-radius: 2px;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: var(--divinho-space-3, 0.75rem);
  flex-shrink: 0;
}

.cookie-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--divinho-space-2, 0.5rem) var(--divinho-space-4, 1rem);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--divinho-radius, 0.5rem);
  border: none;
  cursor: pointer;
  transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.cookie-consent-btn:focus {
  outline: 2px solid var(--divinho-wine-primary, #722f37);
  outline-offset: 2px;
}

.cookie-consent-btn:active {
  transform: scale(0.98);
}

.cookie-consent-btn-primary {
  background: var(--divinho-wine-primary, #722f37);
  color: var(--divinho-white, #ffffff);
}

.cookie-consent-btn-primary:hover {
  background: #8b3d47;
  box-shadow: 0 4px 6px -1px rgba(114, 47, 55, 0.3), 0 2px 4px -1px rgba(114, 47, 55, 0.2);
}

.cookie-consent-btn-secondary {
  background: var(--divinho-gray-100, #f3f4f6);
  color: var(--divinho-gray-700, #374151);
}

.cookie-consent-btn-secondary:hover {
  background: var(--divinho-gray-200, #e5e7eb);
  color: var(--divinho-gray-900, #111827);
}

/* Loading state */
.cookie-consent-btn.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.cookie-consent-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cookie-consent-spin 0.6s linear infinite;
}

@keyframes cookie-consent-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-consent-container {
    flex-direction: column;
    align-items: stretch;
    padding: var(--divinho-space-3, 0.75rem);
  }
  
  .cookie-consent-content {
    min-width: 100%;
  }
  
  .cookie-consent-actions {
    width: 100%;
    flex-direction: column-reverse;
  }
  
  .cookie-consent-btn {
    width: 100%;
    padding: var(--divinho-space-3, 0.75rem);
  }
}

@media (max-width: 480px) {
  .cookie-consent-title {
    font-size: 0.9375rem;
  }
  
  .cookie-consent-message {
    font-size: 0.75rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .divinho-cookie-consent {
    border-top: 2px solid var(--divinho-gray-900, #111827);
  }
  
  .cookie-consent-btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .divinho-cookie-consent {
    transition: opacity 150ms ease, visibility 150ms ease;
    transform: none;
  }
  
  .cookie-consent-btn {
    transition: background-color 150ms ease, color 150ms ease;
  }
  
  .cookie-consent-btn:active {
    transform: none;
  }
  
  @keyframes cookie-consent-spin {
    to {
      transform: none;
    }
  }
}

/* Print styles */
@media print {
  .divinho-cookie-consent {
    display: none !important;
  }
}
