/* Cookie consent banner. Built by boot.js, styled here.
   Borrows the site's card language from styles.css: 12px radius on the panel,
   999px pills for the buttons, the same soft drop shadow as the nav menu. */

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  /* Above the sticky header, which sits at z-index 100. */
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.consent-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.consent-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  /* Matches the 960px content column the rest of the site runs in. */
  max-width: 960px;
  margin: 0 auto;
  padding: 1.1rem 1.35rem;
  background: #fff;
  border: 1px solid var(--hairline, rgba(17, 20, 32, 0.09));
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.consent-copy {
  flex: 1;
  min-width: 0;
}

.consent-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--anchor, #12141a);
}

.consent-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #4a4f5c;
}

.consent-desc a {
  color: var(--ask-blue, #3e68ee);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.6rem;
}

.consent-btn {
  padding: 0.55rem 1.35rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.consent-btn--ghost {
  background: transparent;
  color: #1a1a1a;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
}

.consent-btn--ghost:hover {
  color: var(--ask-blue, #3e68ee);
  border-color: var(--ask-blue, #3e68ee);
  background: rgba(62, 104, 238, 0.04);
}

.consent-btn--solid {
  background: var(--ask-blue, #3e68ee);
  color: #fff;
  border: 1.5px solid var(--ask-blue, #3e68ee);
}

.consent-btn--solid:hover {
  background: var(--ask-blue-deep, #254dcc);
  border-color: var(--ask-blue-deep, #254dcc);
}

.consent-btn:focus-visible {
  outline: 2px solid var(--ask-blue, #3e68ee);
  outline-offset: 2px;
}

/* Stacked below the point where the copy and both pills stop fitting on one line. */
@media (max-width: 700px) {
  .consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
  }

  .consent-actions {
    justify-content: stretch;
  }

  .consent-btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner {
    transition: none;
    transform: none;
  }
}

/* The footer's "Cookie Settings" control. A <button>, not a link, because it
   performs an action rather than navigating -- and because an <a href="#">
   whose JS never runs silently jumps the visitor to the top of the page.
   Styled to sit invisibly among the footer's other links. */
.consent-reopen {
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  color: #888;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.consent-reopen:hover {
  color: #0057ff;
}

.consent-reopen:focus-visible {
  outline: 2px solid var(--ask-blue, #3e68ee);
  outline-offset: 2px;
  border-radius: 3px;
}
