/* Cookie banner additions (Nov 2026). The base styles are in components.css. */

/* Reject sits beside Accept and looks the same: saying no is as easy as yes */
.cookie-actions { flex-wrap: wrap; justify-content: flex-end; }
.cookie-actions .cookie-btn-plain {
  background: transparent;
  border-color: transparent;
  color: var(--forest-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.cookie-actions .cookie-btn-plain:hover {
  background: rgba(27, 81, 55, 0.08);
  transform: none;
  box-shadow: none;
}

.cookie-text .cookie-link { white-space: nowrap; }

/* "Always on" beside Essential */
.cookie-always-on {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: normal;
  color: #555;
}

/* The switches can be reached and seen with a keyboard */
.cookie-toggle input:focus-visible + .cookie-slider {
  outline: 3px solid var(--forest-green);
  outline-offset: 2px;
}

/* Accept all in the window: same weight as Reject */
#cookieAcceptAllModal {
  background: transparent;
  color: var(--forest-green);
  border-color: var(--forest-green);
}
#cookieAcceptAllModal:hover {
  background: var(--forest-green);
  color: var(--text-color);
  transform: translateY(-2px);
}

.cookie-settings-actions { flex-wrap: wrap; }

/* Footer link: looks like the other footer links */
.footer-left .cookie-settings-link { cursor: pointer; }

@media (max-width: 768px) {
  .cookie-content { flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.25rem 1rem; }
  .cookie-actions { justify-content: stretch; gap: 0.5rem; }
  .cookie-actions .cookie-btn { flex: 1 1 40%; }
  .cookie-actions .cookie-btn-plain { flex-basis: 100%; }
  .cookie-settings-actions { justify-content: stretch; }
  .cookie-settings-actions .cookie-btn { flex: 1 1 40%; min-width: 0; }
  #cookieSavePreferences { flex-basis: 100%; order: -1; }
}

/* The choices window: components.css fixes it at 600px tall with scrolling
   off on desktop, which cut off the last description. Let it grow to the
   window height, a little wider, and scroll if it still doesn't fit. The
   buttons stay in view at the bottom while scrolling. */
.cookie-settings-content {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (min-width: 768px) {
  .cookie-settings-content {
    max-width: 680px;
    max-height: calc(100vh - 3rem);
    max-height: calc(100dvh - 3rem);
    overflow-y: auto;
    padding: 1.5rem 1.75rem 0;
  }
}
.cookie-settings-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-bottom: 1.25rem;
  z-index: 1;
}
