/* ============================================
   Cookie Consent Banner — non-modal, bottom-fixed
   z-index 1050: above nav (1000), below modal (1100)
   ============================================ */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: 0 -4px 20px var(--shadow-color);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

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

.cookie-consent__text {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  max-width: 720px;
}

.cookie-consent__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

/* Self-contained button styles using CSS variables.
   WHY not .btn from controls.css: calculator/index.html doesn't load controls.css. */
.cookie-consent__btn {
  padding: 10px 20px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  color: #fff;
  min-width: 140px;
}

.cookie-consent__btn:hover:not(:disabled) { transform: translateY(-1px); }
.cookie-consent__btn:active:not(:disabled) { transform: translateY(0); }
.cookie-consent__btn:disabled { opacity: 0.6; cursor: not-allowed; }

.cookie-consent__btn--accept { background: var(--color-success-bg); }
.cookie-consent__btn--accept:hover:not(:disabled) { background: var(--color-success); }

.cookie-consent__btn--reject { background: var(--bg-active); }
.cookie-consent__btn--reject:hover:not(:disabled) { background: var(--bg-active-hover); }

.cookie-consent__btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.cookie-consent__link {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: underline;
}

.cookie-consent__link:hover { color: var(--color-focus); }

.cookie-consent__link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Desktop layout (601px+) — text left, actions right */
@media (min-width: 601px) {
  .cookie-consent {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 24px;
  }
  .cookie-consent__text {
    text-align: left;
    flex: 1;
  }
  .cookie-consent__actions {
    flex-direction: row;
    width: auto;
  }
  .cookie-consent__btn {
    min-width: auto;
  }
}

/* Print: banner is UI chrome, never appears in printed output */
@media print {
  .cookie-consent { display: none !important; }
}

/* Reduced motion: skip slide-up animation */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent { transition: none; }
}
