/*
 * BCM Plan Builder — unique styles only.
 * Site hero, .section, .container, .btn-*, input/select/textarea/label
 * come from design-system-v2.css — do not redefine them here.
 */

/* ── Progress stepper (hero overlay) ── */

.bcm-progress {
  display: flex;
  align-items: flex-start;
  margin: 2.5rem auto 0;
  max-width: 500px;
}

.bcm-step-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  gap: 0.4rem;
}

.bcm-step-label:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.25);
  z-index: 0;
}

.bcm-step-label.done::after,
.bcm-step-label.active::after {
  background: rgba(255,255,255,0.7);
}

.bcm-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  z-index: 1;
  position: relative;
  transition: all 0.25s ease;
}

.bcm-step-label.done .bcm-step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.bcm-step-label.active .bcm-step-dot {
  background: #fff;
  border-color: #fff;
  color: var(--primary);
  font-weight: 800;
}

.bcm-step-text {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.bcm-step-label.active .bcm-step-text { color: #fff; font-weight: 700; }
.bcm-step-label.done .bcm-step-text  { color: rgba(255,255,255,0.8); }

/* ── Form card (matches contact page container) ── */

.bcm-card {
  background: var(--white);
  padding: 2.5rem 2.5rem 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--light-gray);
  margin-top: 2rem;
}

.bcm-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.35rem;
}

.bcm-card-desc {
  color: var(--gray);
  font-size: 0.92rem;
  margin: 0 0 1.75rem;
  line-height: 1.55;
}

/* ── Field sub-sections ── */

.bcm-section {
  margin-bottom: 1.75rem;
}

.bcm-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-gray);
}

/* ── Field grid rows ── */

.bcm-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.bcm-field-row.single  { grid-template-columns: 1fr; }
.bcm-field-row.triple  { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 600px) {
  .bcm-field-row,
  .bcm-field-row.triple { grid-template-columns: 1fr; }
  .bcm-card { padding: 1.75rem 1.25rem; }
}

.bcm-field {
  display: flex;
  flex-direction: column;
}

/* Inputs/selects/textareas inherit the site's global rules from reset.css;
   only add what's missing for the form-builder context */
.bcm-field input,
.bcm-field select,
.bcm-field textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
}

.bcm-field textarea {
  resize: vertical;
  min-height: 80px;
}

.bcm-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
}

.bcm-field label .opt {
  font-weight: 400;
  color: var(--gray);
  font-size: 0.78rem;
}

/* ── Service table ── */

.bcm-services-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.bcm-services-table th {
  background: #f1f5f9;
  color: var(--dark);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.55rem 0.75rem;
  text-align: left;
  border: 1px solid var(--light-gray);
}

.bcm-services-table td {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--light-gray);
  vertical-align: middle;
}

.bcm-services-table td.service-name {
  font-weight: 600;
  background: #f8fafc;
  white-space: nowrap;
  width: 200px;
  color: var(--dark);
}

.bcm-services-table input,
.bcm-services-table select {
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  width: 100%;
  box-sizing: border-box;
}

/* ── Step nav bar ── */

.bcm-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-gray);
  gap: 1rem;
}

.bcm-nav .btn { min-width: 140px; }

/* ── Steps visibility ── */

.bcm-step { display: none; }
.bcm-step.active { display: block; }

/* ── Success screen ── */

.bcm-success {
  text-align: center;
  padding: 2rem 0 1rem;
}

.bcm-success-icon {
  width: 72px;
  height: 72px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
}

.bcm-success h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 0.5rem;
}

.bcm-success p {
  color: var(--gray);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.bcm-dl-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.bcm-tip {
  margin-top: 1.5rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--border-radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: #1e40af;
  line-height: 1.5;
  text-align: left;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Loading spinner ── */

.bcm-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bcm-spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

@keyframes bcm-spin { to { transform: rotate(360deg); } }

/* ── Related articles ── */

.bcm-related {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
}

.bcm-related h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 1rem;
}

.bcm-related ul {
  margin: 0;
  padding: 0 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.9;
}

.bcm-related ul li a {
  color: var(--primary);
  text-decoration: none;
}

.bcm-related ul li a:hover { text-decoration: underline; }

/* (PDF rendering is done via a dynamically-created iframe — no static element needed) */
