/* LaFactory Blocks, cookie consent. Colors from the --lfb-* palette (see lafactory-blocks.css). */

.lfb-consent {
  font-family: var(--lfb-font, inherit);
  color: var(--lfb-ink, #111827);
  box-sizing: border-box;
}

.lfb-consent *,
.lfb-consent *::before,
.lfb-consent *::after {
  box-sizing: inherit;
}

.lfb-consent[hidden],
.lfb-consent [hidden] {
  display: none !important;
}

/* Banner: a bar at the bottom, not modal; the page stays usable beside it. */
.lfb-consent__banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  padding: 0 14px 14px;
  pointer-events: none;
}

.lfb-consent__card {
  pointer-events: auto;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--lfb-surface, #ffffff);
  border: 1px solid var(--lfb-border, #e5e7eb);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.22);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  animation: lfb-consent-rise 0.22s ease-out both;
}

@keyframes lfb-consent-rise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.lfb-consent__text {
  flex: 1 1 340px;
  min-width: 0;
}

.lfb-consent__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--lfb-ink, #111827);
}

.lfb-consent__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--lfb-muted, #6b7280);
}

.lfb-consent__link,
.lfb-consent__foot a {
  color: var(--lfb-accent-strong, #1d4ed8);
  font-weight: 700;
  text-decoration: underline;
}

/* "Accept all" and "Refuse all": same class, same size, same weight. Refusing is as easy as accepting. */
.lfb-consent__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.lfb-consent__btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 10px;
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid transparent;
  margin: 0;
}

.lfb-consent__btn--primary {
  background: var(--lfb-accent, #2563eb);
  color: var(--lfb-on-accent, #ffffff);
  border-color: var(--lfb-accent, #2563eb);
  min-width: 156px;
}

.lfb-consent__btn--primary:hover {
  background: var(--lfb-accent-strong, #1d4ed8);
  border-color: var(--lfb-accent-strong, #1d4ed8);
  color: var(--lfb-on-accent, #ffffff);
}

.lfb-consent__btn--ghost {
  background: var(--lfb-surface, #ffffff);
  color: var(--lfb-ink, #111827);
  border-color: var(--lfb-border, #e5e7eb);
}

.lfb-consent__btn--ghost:hover {
  border-color: var(--lfb-accent, #2563eb);
  color: var(--lfb-accent-strong, #1d4ed8);
}

.lfb-consent__btn-link {
  font: inherit;
  background: none;
  border: 0;
  color: var(--lfb-muted, #6b7280);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: underline;
  padding: 10px 4px;
  min-height: 44px;
  cursor: pointer;
}

.lfb-consent__btn-link:hover {
  color: var(--lfb-ink, #111827);
}

.lfb-consent__btn:focus-visible,
.lfb-consent__btn-link:focus-visible,
.lfb-consent__close:focus-visible,
.lfb-consent a:focus-visible,
.lfb-consent__switch input:focus-visible {
  outline: 3px solid var(--lfb-accent, #2563eb);
  outline-offset: 2px;
}

/* Panel: modal, focus kept inside, Escape closes it. */
.lfb-consent__panel {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lfb-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.58);
}

.lfb-consent__dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: var(--lfb-surface, #ffffff);
  border: 1px solid var(--lfb-border, #e5e7eb);
  border-radius: 18px;
  padding: 26px 26px 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  animation: lfb-consent-rise 0.18s ease-out both;
}

.lfb-consent__dialog h2 {
  margin: 0 0 8px;
  padding-right: 34px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--lfb-ink, #111827);
}

.lfb-consent__dialog .lfb-consent__desc {
  margin: 0 0 18px;
  font-size: 14px;
}

.lfb-consent__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--lfb-border, #e5e7eb);
  background: var(--lfb-surface, #ffffff);
  color: var(--lfb-muted, #6b7280);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lfb-consent__close:hover {
  color: var(--lfb-ink, #111827);
  border-color: var(--lfb-accent, #2563eb);
}

.lfb-consent__gpc {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--lfb-border, #e5e7eb);
  border-left: 3px solid var(--lfb-accent, #2563eb);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--lfb-muted, #6b7280);
}

.lfb-consent__purposes {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lfb-consent__purpose {
  margin: 0;
  border: 1px solid var(--lfb-border, #e5e7eb);
  border-radius: 13px;
  padding: 14px 16px;
}

.lfb-consent__purpose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lfb-consent__purpose-name {
  font-size: 14.5px;
  font-weight: 700;
}

.lfb-consent__always {
  font-size: 12px;
  font-weight: 700;
  color: var(--lfb-accent-strong, #1d4ed8);
  border: 1px solid var(--lfb-accent-strong, #1d4ed8);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.lfb-consent__purpose-desc {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--lfb-muted, #6b7280);
}

.lfb-consent__switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  min-height: 24px;
  margin: 0;
}

.lfb-consent__switch input {
  appearance: auto;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--lfb-accent, #2563eb);
  cursor: pointer;
  flex: none;
}

.lfb-consent__panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lfb-consent__panel-actions .lfb-consent__btn {
  flex: 1 1 170px;
}

.lfb-consent__foot {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--lfb-muted, #6b7280);
}

/* Link added by the script at the end of a footer that has none: plain text, in the footer's own colours. */
.lfb-cookie-link--auto {
  margin: 12px auto;
  text-align: center;
  font-size: 13px;
}

.lfb-cookie-link--auto a {
  color: inherit;
}

/* Embed waiting for "External content". */
.wp-block-embed__wrapper {
  position: relative;
}

.lfb-consent-holder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: var(--lfb-surface-soft, #f9fafb);
  border: 1px solid var(--lfb-border, #e5e7eb);
  border-radius: var(--lfb-radius, 8px);
  font-family: var(--lfb-font, inherit);
}

.lfb-consent-holder p {
  margin: 0;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--lfb-text, #374151);
}

.wp-block-embed:not(.wp-has-aspect-ratio) .lfb-consent-holder {
  position: static;
  min-height: 220px;
}

@media (max-width: 720px) {
  .lfb-consent__card {
    padding: 14px 16px;
  }
  .lfb-consent__actions {
    width: 100%;
  }
  .lfb-consent__actions .lfb-consent__btn--primary {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lfb-consent__card,
  .lfb-consent__dialog {
    animation: none;
  }
}
