/**
 * BackupPower Notification Banner Styles
 *
 * All styles under .bpt-banner namespace.
 * Banner uses position:fixed — zero CLS, no document flow impact.
 * Colors injected via CSS custom properties from admin config.
 *
 * @version 1.7.0
 */

/* ── Base ── */
.bpt-banner {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bpt-banner-bg, #1a1a2e);
  color: var(--bpt-banner-text, #ffffff);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

/* ── Position variants ── */
.bpt-banner--bottom {
  bottom: 0;
  transform: translateY(100%);
}

.bpt-banner--top {
  top: 0;
  transform: translateY(-100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ── Visible state ── */
.bpt-banner--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Hiding animation ── */
.bpt-banner--hiding {
  pointer-events: none;
}

.bpt-banner--hiding.bpt-banner--bottom {
  opacity: 0;
  transform: translateY(100%);
}

.bpt-banner--hiding.bpt-banner--top {
  opacity: 0;
  transform: translateY(-100%);
}

/* ── Inner layout ── */
.bpt-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 48px 12px 24px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 48px;
}

/* ── Message text ── */
.bpt-banner__message {
  margin: 0;
  flex: 0 1 auto;
  text-align: center;
}

/* ── CTA button ── */
.bpt-banner__cta {
  display: inline-block;
  background: var(--bpt-banner-btn, #e94560);
  color: #fff !important;
  padding: 6px 18px;
  border-radius: 4px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.bpt-banner__cta:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.bpt-banner__cta:active {
  transform: scale(0.98);
}

/* ── Dismiss button ── */
.bpt-banner__dismiss {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--bpt-banner-text, #ffffff);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  padding: 4px 8px;
  transition: opacity 0.15s ease;
}

.bpt-banner__dismiss:hover {
  opacity: 1;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .bpt-banner__inner {
    flex-wrap: wrap;
    padding: 14px 48px 14px 16px;
    gap: 10px;
    min-height: 56px;
  }

  .bpt-banner__message {
    flex: 1 1 100%;
    font-size: 13px;
  }

  .bpt-banner__cta {
    padding: 8px 20px;
    font-size: 14px;
  }
}

/* ── Print ── */
@media print {
  .bpt-banner {
    display: none !important;
  }
}

/* ── WP Admin bar adjustment (top position only) ── */
.admin-bar .bpt-banner--top {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .bpt-banner--top {
    top: 46px;
  }
}
