/*
 * Ballistiglass — Terms Consent Banner Styles
 * Non-blocking bottom banner. Navy #002244 / Paper #f5f2eb palette.
 * Zero impact on page rendering or Googlebot indexing.
 */

#bg-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #002244;
  color: #f5f2eb;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.22);
  /* Animate in from bottom */
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.32s ease, opacity 0.32s ease;
  /* Prevent banner from growing too tall */
  max-height: 120px;
  overflow: hidden;
}

.bgcb-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  flex-wrap: wrap;
}

/* Text block */
.bgcb-text {
  flex: 1 1 0;
  min-width: 200px;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #f5f2eb;
}

.bgcb-text a {
  color: #f5f2eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.9;
}

.bgcb-text a:hover,
.bgcb-text a:focus {
  opacity: 1;
  outline: none;
}

/* Actions row */
.bgcb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Accept button — primary */
.bgcb-btn-accept {
  background: #f5f2eb;
  color: #002244;
  border: none;
  border-radius: 3px;
  padding: 8px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease;
}

.bgcb-btn-accept:hover,
.bgcb-btn-accept:focus {
  background: #ffffff;
  color: #001833;
  outline: 2px solid #f5f2eb;
  outline-offset: 2px;
}

/* More info link — secondary */
.bgcb-more {
  color: #f5f2eb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.bgcb-more:hover,
.bgcb-more:focus {
  opacity: 1;
  outline: none;
}

/* × dismiss button */
.bgcb-btn-dismiss {
  background: transparent;
  border: none;
  color: #f5f2eb;
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.bgcb-btn-dismiss:hover,
.bgcb-btn-dismiss:focus {
  opacity: 1;
  outline: 2px solid rgba(245, 242, 235, 0.5);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #bg-consent-banner {
    max-height: 160px;
  }

  .bgcb-inner {
    padding: 12px 16px;
    gap: 10px;
    align-items: flex-start;
  }

  .bgcb-text {
    font-size: 0.78rem;
    width: 100%;
    min-width: 0;
  }

  .bgcb-actions {
    width: 100%;
    gap: 10px;
  }

  .bgcb-btn-accept {
    padding: 7px 16px;
    font-size: 0.78rem;
  }

  .bgcb-more {
    font-size: 0.78rem;
  }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #bg-consent-banner {
    transition: none;
  }
}

/* ──────────────────────────────────────────────────────────────
 * HARD-GATE MODAL
 * Shown when a user triggers a gated action (quote submit, spec
 * sheet PDF download, support mailto) without having accepted
 * the site terms yet.
 * ────────────────────────────────────────────────────────────── */

#bg-terms-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 34, 68, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: bg-gate-fade 0.18s ease;
}

@keyframes bg-gate-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bg-gate-card {
  background: #FAFAF7;
  color: #003660;
  max-width: 520px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 28px 28px 24px;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.bg-gate-title {
  margin: 0 0 10px;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #003660;
}

.bg-gate-body {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #003660;
}

.bg-gate-body a {
  color: #003660;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.bg-gate-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(0, 54, 96, 0.18);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
}

.bg-gate-check input[type="checkbox"] {
  margin: 2px 0 0;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #003660;
  cursor: pointer;
}

.bg-gate-check span {
  color: #003660;
}

.bg-gate-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.bg-gate-cancel,
.bg-gate-accept {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bg-gate-cancel {
  background: transparent;
  color: #003660;
  border-color: rgba(0, 54, 96, 0.35);
}

.bg-gate-cancel:hover,
.bg-gate-cancel:focus {
  background: rgba(0, 54, 96, 0.06);
  outline: none;
}

.bg-gate-accept {
  background: #003660;
  color: #FAFAF7;
  border-color: #003660;
}

.bg-gate-accept:hover:not(:disabled),
.bg-gate-accept:focus:not(:disabled) {
  background: #002244;
  border-color: #002244;
  outline: none;
}

.bg-gate-accept:disabled {
  background: rgba(0, 54, 96, 0.35);
  border-color: transparent;
  cursor: not-allowed;
}

/* Portrait / small screens */
@media (max-width: 480px) {
  .bg-gate-card {
    padding: 22px 20px 20px;
  }
  .bg-gate-title {
    font-size: 1.2rem;
  }
  .bg-gate-body {
    font-size: 0.9rem;
  }
  .bg-gate-actions {
    flex-direction: column-reverse;
  }
  .bg-gate-cancel,
  .bg-gate-accept {
    width: 100%;
    padding: 12px 18px;
  }
}
