#msp-af-chat-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

#msp-af-chat-gate-overlay *,
#msp-af-chat-gate-overlay *::before,
#msp-af-chat-gate-overlay *::after {
  box-sizing: border-box;
}

#msp-af-chat-gate-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.25rem;
  padding-top: 1.35rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

#msp-af-chat-gate-panel .msp-af-chat-gate-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

#msp-af-chat-gate-panel h2 {
  margin: 0;
  flex: 1;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  padding-right: 0.25rem;
}

#msp-af-chat-gate-panel .msp-af-chat-gate-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.25rem -0.35rem 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#msp-af-chat-gate-panel .msp-af-chat-gate-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

#msp-af-chat-gate-panel .msp-af-chat-gate-close:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

#msp-af-chat-gate-panel p.msp-af-chat-gate-intro {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

#msp-af-chat-gate-panel label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #334155;
}

#msp-af-chat-gate-panel input[type="text"],
#msp-af-chat-gate-panel input[type="email"],
#msp-af-chat-gate-panel input[type="url"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9375rem;
}

#msp-af-chat-gate-panel input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: #2563eb;
}

#msp-af-chat-gate-panel .msp-af-chat-gate-actions {
  margin-top: 0.5rem;
}

#msp-af-chat-gate-panel button[type="submit"] {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#msp-af-chat-gate-panel button[type="submit"]:hover {
  background: #1d4ed8;
}

#msp-af-chat-gate-panel button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#msp-af-chat-gate-panel .msp-af-chat-gate-error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 6px;
  display: none;
}

#msp-af-chat-gate-panel .msp-af-chat-gate-error.is-visible {
  display: block;
}
