/*
 * Aladinum — consent banner styles (custom markup rendered by consent-init.js).
 *
 * The buttons reuse the site's own component classes (.btn-filled /
 * .btn-outlined) so they match the brand exactly; this file only handles the
 * banner container, layout, and the accessibility/equal-prominence guarantees.
 * Colours come from the global :root design tokens defined in global.css.
 */

.aladinum-consent {
  position: fixed;
  left: 50%;
  /* Bottom-centre, clear of the iOS home indicator. */
  bottom: calc(clamp(0.75rem, 2vw, 1.5rem) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 9999;
  width: min(640px, calc(100% - 1.5rem));
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.aladinum-consent__card {
  background: rgb(var(--color-surface-container-lowest));
  color: rgb(var(--color-on-surface));
  border: 1px solid rgb(var(--color-outline-variant));
  border-top: 3px solid rgb(var(--color-tertiary)); /* copper signal edge */
  border-radius: 12px;
  box-shadow: 0 12px 40px -12px rgb(8 22 38 / 0.5);
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
}

.aladinum-consent__title {
  margin: 0 0 0.5rem;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: rgb(var(--color-on-surface)); /* ink on paper — ~15:1 */
}

.aladinum-consent__body {
  margin: 0 0 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgb(var(--color-on-surface-variant)); /* ~6.4:1 on paper */
}

.aladinum-consent__link {
  color: rgb(var(--color-tertiary)); /* copper — ~5:1 on paper (AA) */
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aladinum-consent__link:hover {
  color: rgb(var(--color-on-tertiary-container));
}

/* Two buttons, one row, equal width and weight. */
.aladinum-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.aladinum-consent__btn {
  flex: 1 1 0;
  min-width: 9rem;
  text-align: center;
}

/* "Decline all" stays as prominent as "Accept all": strong navy outline and
   navy text, never faint or low-contrast. */
.aladinum-consent__btn--decline.btn-outlined {
  border-width: 1.5px;
  border-color: rgb(var(--color-primary));
  color: rgb(var(--color-primary)); /* navy on paper — ~14:1 */
}
.aladinum-consent__btn--decline.btn-outlined:hover {
  background: rgb(var(--color-primary) / 0.06);
  border-color: rgb(var(--color-primary));
}

/* Visible keyboard focus (WCAG 2.2 AA). */
.aladinum-consent:focus,
.aladinum-consent:focus-visible {
  outline: none;
}
.aladinum-consent__btn:focus-visible,
.aladinum-consent__link:focus-visible {
  outline: 2px solid rgb(var(--color-tertiary));
  outline-offset: 2px;
}

/* Very small screens: stack to full width, still equal and prominent. */
@media (max-width: 380px) {
  .aladinum-consent__btn {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .aladinum-consent {
    animation: aladinum-consent-in 0.24s var(--ease-out-quart, ease-out) both;
  }
  @keyframes aladinum-consent-in {
    from {
      opacity: 0;
      transform: translate(-50%, 12px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }
}
