.hp-connect-modal[hidden] { display: none; }

.hp-connect-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hp-connect-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.hp-connect-modal__panel {
  position: relative;
  width: min(100%, 32rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 1rem;
  background: var(--cs-surface, #fff);
  border: 1px solid var(--cs-border, #e2e8f0);
  padding: 1.15rem 1rem 1rem;
  color: var(--cs-text, #0f172a);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.hp-connect-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 999px;
  background: var(--cs-surface-soft, #f8fafc);
  border: 1px solid var(--cs-border, #cbd5e1);
  color: var(--cs-text-muted, #475569);
  cursor: pointer;
}

.hp-connect-modal__title {
  margin: 0 2rem 0.35rem 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.hp-connect-modal__lead {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--cs-text-muted, #64748b);
}

.hp-connect-modal__view[hidden] {
  display: none;
}

.hp-connect-modal__feedback {
  margin-bottom: 0.75rem;
  border-radius: 0.55rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.hp-connect-modal__feedback--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.hp-connect-modal__feedback--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.hp-connect-modal__feedback--success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.hp-connect-modal__rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--cs-border, #e2e8f0);
}

.hp-connect-modal__row {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--cs-border, #e2e8f0);
}

.hp-connect-modal__row-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.hp-connect-modal__row-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cs-text, #0f172a);
}

.hp-connect-modal__row-hint {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--cs-text-muted, #64748b);
}

.hp-connect-modal__row-field {
  min-width: 0;
}

.hp-connect-modal__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--cs-border, #cbd5e1);
  border-radius: 0.55rem;
  padding: 0.48rem 0.55rem;
  font-size: 0.85rem;
  background: var(--cs-surface, #fff);
  color: var(--cs-text, #0f172a);
}

.hp-connect-modal__input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hp-connect-modal__field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #b45309;
}

.hp-connect-modal__field-hint[hidden] {
  display: none;
}

.hp-connect-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.hp-connect-modal__signup {
  margin-top: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--cs-border, #e2e8f0);
  background: var(--cs-surface-soft, #f8fafc);
  padding: 0.85rem 0.9rem;
}

.hp-connect-modal__signup--highlight {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.hp-connect-modal__signup-title {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--cs-text, #0f172a);
}

.hp-connect-modal__signup-text {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--cs-text-muted, #64748b);
}

.hp-connect-modal__signup-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid #1d4ed8;
  border-radius: 0.6rem;
  padding: 0.52rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.hp-connect-modal__signup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.hp-connect-modal__signup-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.hp-connect-modal__signup-btn-label {
  line-height: 1.2;
}

.hp-connect-modal__signup-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.92);
}

.hp-connect-modal__success-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.65rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: #15803d;
  font-size: 1.25rem;
  font-weight: 800;
}

.hp-connect-modal__success-body {
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--cs-text-muted, #64748b);
}

@media (max-width: 520px) {
  .hp-connect-modal__row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
