/* ============================================================
   Bridgepointe — Payment Portal Styles
   payment.css
   ============================================================ */

/* ── Navbar: Client Portal link ──────────────────────────── */
.nav-link-portal {
  color: #60a5fa !important;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link-portal:hover {
  color: #93c5fd !important;
}

/* ── Modal shell ─────────────────────────────────────────── */
.bp-payment-dialog {
  max-width: 640px;
}

.bp-modal-content {
  background: #0d1117;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(59,130,246,0.08);
  overflow: hidden;
}

/* ── Modal header ────────────────────────────────────────── */
.bp-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bp-modal-header-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bp-modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  flex-shrink: 0;
}

.bp-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── Step indicator ──────────────────────────────────────── */
.bp-step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
}

.bp-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.bp-step-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.2);
  transition: background 0.25s, border-color 0.25s;
  display: block;
}

.bp-step-dot.active .bp-step-dot-inner {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59,130,246,0.6);
}

.bp-step-dot.done .bp-step-dot-inner {
  background: #22c55e;
  border-color: #22c55e;
}

.bp-step-dot-label {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.bp-step-dot.active .bp-step-dot-label { color: #93c5fd; }
.bp-step-dot.done  .bp-step-dot-label  { color: #86efac; }

.bp-step-connector {
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin-bottom: 14px;
}

/* ── Modal body ──────────────────────────────────────────── */
.bp-modal-body {
  padding: 1.75rem 1.75rem 1.5rem;
  color: #cbd5e1;
}

/* ── Step intro text ─────────────────────────────────────── */
.bp-step-intro {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 1.4rem;
  text-align: center;
}

/* ── Flow selection cards ────────────────────────────────── */
.bp-flow-grid .col-md-4 { display: flex; }

.bp-flow-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.4rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: #e2e8f0;
}

.bp-flow-card:hover {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.bp-flow-card:active { transform: translateY(-1px); }

.bp-flow-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.bp-flow-icon--blue   { background: rgba(59,130,246,0.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.bp-flow-icon--cyan   { background: rgba(6,182,212,0.15);   color: #22d3ee; border: 1px solid rgba(6,182,212,0.25); }
.bp-flow-icon--purple { background: rgba(139,92,246,0.15);  color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }

.bp-flow-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.bp-flow-sub {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

/* ── Flow panel (step 2 sub-panels) ─────────────────────── */
.bp-flow-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.35rem;
}

.bp-flow-panel-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1.4rem;
  line-height: 1.55;
}

/* ── Form inputs ─────────────────────────────────────────── */
.bp-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.bp-label-optional {
  font-weight: 400;
  color: #475569;
}

.bp-input {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 8px !important;
  color: #f1f5f9 !important;
  font-size: 0.9rem !important;
  padding: 0.6rem 0.85rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.bp-input:focus {
  background: rgba(59,130,246,0.06) !important;
  border-color: rgba(59,130,246,0.5) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12) !important;
  outline: none !important;
  color: #f1f5f9 !important;
}

.bp-input::placeholder { color: #475569 !important; }

/* Dollar prefix input */
.bp-input-prefix-wrap {
  position: relative;
}

.bp-input-prefix {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 2;
}

.bp-input--prefixed {
  padding-left: 1.75rem !important;
}

/* Card number with brand icons */
.bp-card-input-wrap {
  position: relative;
}

.bp-card-icons {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  align-items: center;
  pointer-events: none;
  opacity: 0.6;
}

/* CVV hint badge */
.bp-cvv-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  font-size: 0.65rem;
  color: #64748b;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Payment summary bar (step 3) ────────────────────────── */
.bp-payment-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.4rem;
  gap: 1rem;
}

.bp-summary-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-summary-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: #60a5fa;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Review table (steps 4 & 5) ──────────────────────────── */
.bp-review-table {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
}

.bp-review-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bp-review-row:last-child { border-bottom: none; }

.bp-review-row--total {
  background: rgba(59,130,246,0.06);
  border-top: 1px solid rgba(59,130,246,0.15);
}

.bp-review-label {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.bp-review-value {
  font-size: 0.88rem;
  color: #e2e8f0;
  text-align: right;
  word-break: break-word;
}

.bp-review-total {
  font-size: 1.05rem;
  font-weight: 700;
  color: #60a5fa;
  font-family: 'JetBrains Mono', monospace;
}

.bp-mono { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }

/* ── Receipt (step 5) ────────────────────────────────────── */
.bp-receipt {
  text-align: center;
  padding: 0.5rem 0;
}

.bp-receipt-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  border: 2px solid rgba(34,197,94,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  margin: 0 auto 1.1rem;
}

.bp-receipt-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.4rem;
}

.bp-receipt-sub {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 0;
}

.bp-receipt .bp-review-table { text-align: left; }

/* ── Action row (back + primary) ─────────────────────────── */
.bp-flow-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ── Buttons ─────────────────────────────────────────────── */
.bp-btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
}

.bp-btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
  transform: translateY(-1px);
  color: #fff;
}

.bp-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.bp-btn-back {
  background: transparent;
  color: #64748b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s, border-color 0.2s;
}

.bp-btn-back:hover {
  color: #94a3b8;
  border-color: rgba(255,255,255,0.2);
}

.bp-btn-pay {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.bp-btn-pay:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
  transform: translateY(-1px);
  color: #fff;
}

.bp-btn-pay:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Error messages ──────────────────────────────────────── */
.bp-error-msg {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.82rem;
  padding: 0.6rem 0.85rem;
  line-height: 1.5;
}

/* ── Secure note ─────────────────────────────────────────── */
.bp-secure-note {
  font-size: 0.75rem;
  color: #475569;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.bp-secure-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 575px) {
  .bp-modal-body { padding: 1.25rem 1rem; }
  .bp-flow-card  { padding: 1rem 0.75rem; }
  .bp-step-indicator { display: none; }
  .bp-flow-panel-actions { flex-direction: column-reverse; }
  .bp-btn-primary,
  .bp-btn-pay,
  .bp-btn-back { width: 100%; justify-content: center; }
}
