/**
 * Avesco Cookie Consent — compact bottom bar.
 * Brand-matched to the Avesco theme (navy ink surface, electric-blue accept).
 *
 * Visible by default (fail-safe): JS only HIDES it once a choice cookie exists,
 * so a JS error/block can't leave the bar permanently invisible.
 */
.avcc-bar {
  /* Defaults; overridden per-site by the inline style the plugin prints from
     the admin colour settings. */
  --avcc-bg:            #030c2a;
  --avcc-text:          #e8ecff;
  --avcc-link:          #ffffff;
  --avcc-accept-bg:     #1426f6;
  --avcc-accept-text:   #ffffff;
  --avcc-reject-text:   #e8ecff;
  --avcc-reject-border: #6675b0;

  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000; /* above sticky navs / overlays */

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;

  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;

  background: var(--avcc-bg);
  color: var(--avcc-text);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(2, 3, 10, 0.35);

  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;

  animation: avcc-rise 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes avcc-rise {
  from { transform: translateY(140%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* JS adds this the moment it sees a stored choice → hide the bar. */
.avcc-bar.avcc-decided {
  display: none !important;
}

/* JS adds this to animate the bar out after a click before removal — it slides
   straight down and tucks fully past the bottom edge, then fades out at the
   end. calc() clears the bar's own height PLUS its 16px bottom offset and the
   shadow, so nothing peeks back up. */
.avcc-bar.avcc-leaving {
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease 0.1s;
  pointer-events: none;
}

.avcc-text {
  margin: 0;
  flex: 1 1 320px;
  color: var(--avcc-text);
}

.avcc-link {
  color: var(--avcc-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.avcc-link:hover,
.avcc-link:focus-visible {
  color: var(--avcc-link);
  text-decoration-thickness: 2px;
}

.avcc-sep {
  margin: 0 4px;
  opacity: 0.5;
}

.avcc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.avcc-btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 18px;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.06s ease;
}
.avcc-btn:active {
  transform: translateY(1px);
}
.avcc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.avcc-btn--ghost {
  background: transparent;
  color: var(--avcc-reject-text);
  border-color: var(--avcc-reject-border);
}
.avcc-btn--ghost:hover {
  background: rgba(127, 127, 127, 0.14);
  border-color: var(--avcc-reject-text);
}

.avcc-btn--accept {
  background: var(--avcc-accept-bg);
  color: var(--avcc-accept-text);
}
.avcc-btn--accept:hover {
  filter: brightness(1.12);
}

/* Phones: stack text over full-width buttons. */
@media (max-width: 560px) {
  .avcc-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 12px;
  }
  .avcc-actions {
    width: 100%;
  }
  .avcc-btn {
    flex: 1 1 0;
    padding: 11px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avcc-bar {
    animation: none;
  }
  .avcc-bar.avcc-leaving {
    transition: opacity 0.2s ease;
    transform: none;
  }
}
