/**
 * GDPR-compliant Cookie Consent Dialog — Styles
 * Modal dialog design matching website style
 */

/* Overlay background */
.cookie-consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.35s ease;
}

.cookie-consent-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Dialog box: centered modal */
.cookie-consent-banner {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));
  border: 1px solid rgba(226, 232, 240, 0.8);
  max-width: 600px;
  width: 100%;
  padding: 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-primary, #0f172a);
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: scale(1);
}

.cookie-consent-banner.is-hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Close button */
.cookie-consent-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm, 8px);
  color: var(--color-text-secondary, #475569);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.2s, color 0.2s;
  padding: 0;
  min-width: 32px;
  min-height: 32px;
}

.cookie-consent-close:hover {
  background: #f1f5f9;
  color: var(--color-text-primary, #0f172a);
}

.cookie-consent-close:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
}

/* Inner container */
.cookie-consent-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Text content */
.cookie-consent-text {
  margin: 0;
  padding-right: 32px;
  color: var(--color-text-primary, #0f172a);
  font-size: 15px;
  line-height: 1.6;
}

/* Button group */
.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

/* Base button */
.cookie-consent-btn {
  padding: 12px 24px;
  border-radius: var(--radius-md, 12px);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
  font-family: inherit;
  min-height: var(--touch-target-min, 44px);
  flex: 1;
  min-width: 140px;
}

.cookie-consent-btn:active {
  transform: scale(0.98);
}

/* Focus ring for accessibility */
.cookie-consent-btn:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
}

/* Accept all - Green */
.cookie-consent-btn-accept {
  background: #7AC74F;
  color: #ffffff;
}

.cookie-consent-btn-accept:hover {
  background: #6ab83f;
  box-shadow: 0 4px 12px rgba(122, 199, 79, 0.3);
}

.cookie-consent-btn-accept:active {
  background: #5aa32f;
}

/* Only essential - Light blue/lavender */
.cookie-consent-btn-reject {
  background: #D3DDFB;
  color: #5F66DE;
}

.cookie-consent-btn-reject:hover {
  background: #c2cef9;
  box-shadow: 0 4px 12px rgba(95, 102, 222, 0.2);
}

.cookie-consent-btn-reject:active {
  background: #b1bff7;
}

/* Preferences - Light purple/lavender */
.cookie-consent-btn-preferences {
  background: #E4DFFC;
  color: #8E5EE9;
}

.cookie-consent-btn-preferences:hover {
  background: #d9d1fa;
  box-shadow: 0 4px 12px rgba(142, 94, 233, 0.2);
}

.cookie-consent-btn-preferences:active {
  background: #cec3f8;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .cookie-consent-banner {
    padding: 20px;
    max-width: 100%;
  }
  
  .cookie-consent-text {
    padding-right: 0;
    font-size: 14px;
  }
  
  .cookie-consent-actions {
    flex-direction: column;
  }
  
  .cookie-consent-btn {
    width: 100%;
    min-width: 100%;
  }
  
  .cookie-consent-close {
    top: 12px;
    right: 12px;
  }
}
