/* FEB Yapı cookie consent banner and "Çerez tercihleri" opener (markup: src/Consent.php; behaviour:
 * measurement.js). Site-wide: the portal and the theme's pages. Non-modal, fixed to the bottom; while it
 * is shown the page reserves its height (--feb-consent-space) so the end of the page stays reachable. Both
 * choices share one equal style. Ink on surface 10.6:1; ink on sea buttons 7.9:1, on sage hover 8.4:1.
 * Tokens: theme.css. */

body.feb-consent-shown {
  padding-bottom: var(--feb-consent-space, 0px);
}

.feb-consent {
  position: fixed;
  z-index: 2147483000;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  max-height: 70vh;
  overflow-y: auto;
  margin: 0;
  padding: 0.625rem clamp(1rem, 3.2vw, 3.5rem) calc(0.625rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--feb-line);
  background: var(--feb-surface);
  color: var(--feb-ink);
  box-shadow: 0 -8px 24px rgba(27, 56, 64, 0.12);
  font-family: var(--feb-font);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.feb-consent[hidden] {
  display: none;
}

.feb-consent__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.feb-consent__title:focus {
  outline: none;
}

.feb-consent__title:focus-visible {
  outline: 3px solid var(--feb-ink);
  outline-offset: 3px;
}

.feb-consent__text {
  margin: 0;
  max-width: 80ch;
}

.feb-consent__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.feb-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.feb-consent__button {
  flex: 1 1 8rem;
  min-height: 44px;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--feb-accent);
  border-radius: 0;
  background: var(--feb-sea);
  color: var(--feb-ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.feb-consent__button:hover {
  border-color: var(--feb-accent);
  background: var(--feb-sage);
  color: var(--feb-ink);
}

.feb-consent__button:focus-visible,
.feb-consent__text a:focus-visible,
.feb-consent-open:focus-visible {
  outline: 3px solid var(--feb-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--feb-bg);
}

.feb-consent-reopen {
  margin: 0;
  padding: 0.25rem 1rem;
  background: var(--feb-surface);
  color: var(--feb-ink);
  text-align: center;
}

.feb-consent-open {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 0.625rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.feb-consent-open[hidden] {
  display: none;
}

@media (min-width: 720px) {
  .feb-consent {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 2rem;
    font-size: 0.875rem;
  }

  .feb-consent__actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-wrap: nowrap;
    margin-top: 0;
  }

  .feb-consent__button {
    flex: 0 0 auto;
  }
}

@media (forced-colors: active) {
  .feb-consent {
    border-top: 1px solid CanvasText;
  }

  .feb-consent__button,
  .feb-consent-open {
    border: 1px solid ButtonText;
  }
}
