/* ══════════════════════════════════════════════════════════════════
   Ferrite Bead Optimizer — TRIAL GATE
   Modal shown when a trial visitor tries to run the optimizer without
   being registered / subscribed to the required plan. Mirrors the
   help-backdrop / help-panel visual language already used on this
   page, but kept in its own file+prefix (fb-gate-*) so it stays
   independent of the help dialog and the paid version of this tool.
   ══════════════════════════════════════════════════════════════════ */

.fb-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(5px);
  padding: 24px;
  display: grid;
  place-items: center;
}
.fb-gate-backdrop[hidden] {
  display: none;
}

.fb-gate-panel {
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--bg-base, #0f172a);
  border: 1px solid var(--border, #1e293b);
  border-radius: var(--radius-xl, 16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: var(--sp-8, 32px) var(--sp-8, 32px) var(--sp-6, 24px);
  position: relative;
  animation: fb-gate-pop 0.18s ease-out;
}
@keyframes fb-gate-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fb-gate-close {
  position: absolute;
  top: var(--sp-4, 16px);
  right: var(--sp-4, 16px);
  border: 0;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.fb-gate-close:hover,
.fb-gate-close:focus-visible {
  color: var(--text-base, #f1f5f9);
}

.fb-gate-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full, 999px);
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-400, #60a5fa);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-4, 16px);
}

.fb-gate-kicker {
  display: inline-block;
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--weight-semi, 600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-400, #60a5fa);
  margin-bottom: var(--sp-2, 8px);
}

.fb-gate-panel h2 {
  font-size: var(--text-xl, 1.25rem);
  color: var(--text-base, #f1f5f9);
  margin-bottom: var(--sp-3, 12px);
}

.fb-gate-panel p {
  color: var(--text-sub, #94a3b8);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.7;
  margin-bottom: var(--sp-4, 16px);
}

.fb-gate-plan-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3, 12px);
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border, #1e293b);
  border-radius: var(--radius-md, 10px);
  margin-bottom: var(--sp-5, 20px);
  font-size: var(--text-sm, 0.875rem);
}
.fb-gate-plan-row .fb-gate-arrow {
  color: var(--text-faint, #64748b);
}

.fb-gate-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6, 24px);
  display: grid;
  gap: var(--sp-2, 8px);
}
.fb-gate-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2, 8px);
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-sub, #94a3b8);
}
.fb-gate-features svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--success, #34d399);
}

.fb-gate-actions {
  display: grid;
  gap: var(--sp-3, 12px);
}
.fb-gate-actions .btn {
  width: 100%;
  justify-content: center;
}

.fb-gate-foot {
  text-align: center;
  font-size: var(--text-xs, 0.75rem);
  color: var(--text-muted, #94a3b8);
  margin-top: var(--sp-4, 16px);
}
.fb-gate-foot a {
  color: var(--primary-400, #60a5fa);
  text-decoration: none;
}
.fb-gate-foot a:hover {
  text-decoration: underline;
}

.fb-trial-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-3, 12px);
  padding: var(--sp-3, 12px) var(--sp-5, 20px);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md, 10px);
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-sub, #94a3b8);
  margin-bottom: var(--sp-6, 24px);
}
.fb-trial-banner strong {
  color: var(--text-base, #f1f5f9);
}
.fb-trial-banner a {
  color: var(--primary-400, #60a5fa);
  font-weight: var(--weight-semi, 600);
  text-decoration: none;
}
.fb-trial-banner a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .fb-gate-panel {
    animation: none;
  }
}
