/* Bousba Projects — Frontend Styles */

/* ── Multi-Step Form Wrapper ─── */
.bp-form-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* ── Progress Bar ─── */
.bp-progress { margin-bottom: var(--space-xl); }
.bp-progress__bar {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.bp-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--brand-orange));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}
.bp-progress__steps {
  display: flex;
  justify-content: space-between;
}
.bp-progress__step {
  font-size: 0.85rem;
  color: var(--muted-fg);
  font-weight: 500;
  transition: color var(--transition-fast);
}
.bp-progress__step.active { color: var(--accent); font-weight: 700; }
.bp-progress__step.completed { color: var(--success); }

/* ── Step Visibility ─── */
.bp-step { display: none; animation: fadeInUp 0.4s ease; }
.bp-step.active { display: block; }

/* ── Form Fields ─── */
.bp-form h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.bp-form__subtitle {
  color: var(--muted-fg);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}
.bp-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.bp-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--fg);
}
.bp-field input,
.bp-field select,
.bp-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--card);
  color: var(--fg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.bp-field input:focus,
.bp-field select:focus,
.bp-field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}
.bp-field__hint {
  font-size: 0.8rem;
  color: var(--muted-fg);
  margin-top: 4px;
}
.bp-file-input {
  padding: 10px !important;
  border-style: dashed !important;
  cursor: pointer;
}

/* ── Service Type Cards ─── */
.bp-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.bp-service-option input { display: none; }
.bp-service-option__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--card);
}
.bp-service-option__card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.bp-service-option input:checked + .bp-service-option__card {
  border-color: var(--accent);
  background: rgba(217, 119, 6, 0.06);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
.bp-service-option__icon { font-size: 2.5rem; margin-bottom: var(--space-xs); }
.bp-service-option__title { font-weight: 700; font-size: 0.95rem; }
.bp-service-option__desc { font-size: 0.8rem; color: var(--muted-fg); margin-top: 4px; }

/* ── Checkbox Grid ─── */
.bp-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}
.bp-checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  background: var(--card);
}
.bp-checkbox-option:hover { border-color: var(--accent); }
.bp-checkbox-option input:checked + span { color: var(--accent); font-weight: 600; }
.bp-checkbox-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(217, 119, 6, 0.06);
}

/* ── Form Actions ─── */
.bp-form__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  gap: var(--space-sm);
}

/* ── Success State ─── */
.bp-success {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}
.bp-success__icon { font-size: 4rem; margin-bottom: var(--space-md); }
.bp-success h3 { font-size: 1.8rem; margin-bottom: var(--space-sm); }
.bp-success p { color: var(--muted-fg); font-size: 1.05rem; margin-bottom: var(--space-xs); }
.bp-success__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ── Loading ─── */
.bp-loading {
  position: absolute;
  inset: 0;
  background: rgba(250, 245, 242, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--radius-lg);
}
.bp-loading__spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: bp-spin 0.8s linear infinite;
  margin-bottom: var(--space-sm);
}
@keyframes bp-spin { to { transform: rotate(360deg); } }

/* ── Contractor Hero ─── */
.bp-contractor-hero {
  text-align: center;
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--primary), #2d2926);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}
.bp-contractor-hero__badge {
  display: inline-flex;
  padding: 6px 16px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}
.bp-contractor-hero h2 { color: #fff; margin-bottom: var(--space-xs); }
.bp-contractor-hero p { opacity: 0.85; font-size: 1rem; }
.bp-contractor-benefits {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}
.bp-benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
}
.bp-benefit__icon { font-size: 1.2rem; }

/* ── Portal ─── */
.bp-portal__header {
  margin-bottom: var(--space-xl);
}
.bp-portal__header h2 { margin-bottom: 4px; }
.bp-portal__header p { color: var(--muted-fg); }

/* ── Contractor Stats ─── */
.bp-contractor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.bp-stat-card {
  text-align: center;
  padding: var(--space-lg);
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.bp-stat-card__number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading-fr);
}
.bp-stat-card__label { color: var(--muted-fg); font-size: 0.9rem; margin-top: 4px; }

/* ── Project Cards ─── */
.bp-project-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  transition: box-shadow var(--transition-base);
}
.bp-project-card:hover { box-shadow: var(--shadow-md); }
.bp-project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.bp-project-card__id {
  font-family: var(--font-heading-fr);
  font-weight: 700;
  color: var(--muted-fg);
}
.bp-project-card__status {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.bp-project-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.bp-project-card__service { font-weight: 600; font-size: 1rem; }
.bp-project-card__actions {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

/* ── Progress Steps ─── */
.bp-project-card__progress {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  position: relative;
}
.bp-project-card__progress::before {
  content: '';
  position: absolute;
  top: calc(var(--space-sm) + 10px);
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border);
}
.bp-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.bp-progress-step__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--card);
  transition: background var(--transition-fast);
}
.bp-progress-step.active .bp-progress-step__dot { background: var(--success); }
.bp-progress-step span {
  font-size: 0.75rem;
  color: var(--muted-fg);
}
.bp-progress-step.active span { color: var(--success); font-weight: 600; }

/* ── Empty State ─── */
.bp-empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}
.bp-empty-state__icon { font-size: 4rem; margin-bottom: var(--space-md); }
.bp-empty-state h3 { margin-bottom: var(--space-xs); }
.bp-empty-state p { color: var(--muted-fg); margin-bottom: var(--space-lg); }

/* ── Responsive ─── */
@media (max-width: 768px) {
  .bp-service-grid { grid-template-columns: repeat(2, 1fr); }
  .bp-form__grid { grid-template-columns: 1fr; }
  .bp-checkbox-grid { grid-template-columns: repeat(2, 1fr); }
  .bp-contractor-stats { grid-template-columns: 1fr; }
  .bp-contractor-benefits { flex-direction: column; align-items: center; }
  .bp-form__actions { flex-direction: column-reverse; }
  .bp-form__actions .btn { width: 100%; }
  .bp-success__actions { flex-direction: column; }
}
@media (max-width: 480px) {
  .bp-service-grid { grid-template-columns: 1fr; }
  .bp-checkbox-grid { grid-template-columns: 1fr; }
}
