/*
 * SCF Notification Bar — Front-end overlay CSS
 * Uses position:fixed so it NEVER shifts page layout.
 * CLS = 0.
 */

#scf-nb-root {
  all: initial;
}

.scf-nb-bar {
  /* Fixed overlay — does NOT push content */
  position: fixed;
  left: 0;
  right: 0;
  z-index: 999999;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;

  padding: 11px 52px 11px 20px; /* right padding reserves close button space */
  min-height: 48px;
  box-sizing: border-box;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;

  /* entrance animation */
  animation: scfNbSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.scf-nb-bar--top {
  top: 0;
  animation-name: scfNbSlideDown;
}
.scf-nb-bar--bottom {
  bottom: 0;
  animation-name: scfNbSlideUp;
}

@keyframes scfNbSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes scfNbSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Exit animation classes added by JS */
.scf-nb-bar--hiding-top {
  animation: scfNbSlideDownOut 0.3s ease forwards;
}
.scf-nb-bar--hiding-bottom {
  animation: scfNbSlideUpOut 0.3s ease forwards;
}
@keyframes scfNbSlideDownOut {
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}
@keyframes scfNbSlideUpOut {
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Message */
.scf-nb-bar__msg {
  flex: 0 1 auto;
  text-align: center;
  min-width: 0;
}
.scf-nb-bar__msg a {
  color: inherit;
  text-decoration: underline;
}

/* CTA button */
.scf-nb-bar__btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}
.scf-nb-bar__btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

/* Close button */
.scf-nb-bar__close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.75;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}
.scf-nb-bar__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}
.scf-nb-bar__close svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scf-nb-bar,
  .scf-nb-bar--hiding-top,
  .scf-nb-bar--hiding-bottom {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .scf-nb-bar {
    font-size: 13px;
    padding: 10px 44px 10px 14px;
    gap: 10px;
  }
  .scf-nb-bar__msg {
    text-align: left;
  }
}
