/* ==========================================================================
   Insurance Planning Page
   ========================================================================== */

/* ---- Page layout ---- */
.insurance-page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .insurance-page {
    padding: 1.5rem 1.5rem;
  }
}

/* ---- Card wrapper ---- */
.insurance-card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .insurance-card {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   Step Progress Bar (shared styles)
   ========================================================================== */
.step-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.spb-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.spb-step:not(.completed):not(.active) {
  cursor: default;
}

.spb-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
  background: #f3f4f6;
  color: #9CA3AF;
}

.spb-step.completed .spb-circle {
  background: #059669;
  color: white;
}

.spb-step.active .spb-circle {
  background: #1E40AF;
  color: white;
  box-shadow: 0 0 0 4px #DBEAFE;
}

.spb-label {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  color: #9CA3AF;
}

.spb-step.active .spb-label {
  color: #1E40AF;
}

.spb-step.completed .spb-label {
  color: #059669;
}

.spb-connector {
  flex: 1;
  height: 2px;
  margin: 0 8px;
  border-radius: 9999px;
  background: #e5e7eb;
  margin-bottom: 20px;
}

.spb-connector.completed {
  background: #059669;
}

/* ==========================================================================
   Step Content Header
   ========================================================================== */
.insurance-step-header {
  margin-bottom: 1.25rem;
}

.insurance-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.insurance-step-subtitle {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0.25rem 0 0;
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */
.insurance-nav {
  display: flex;
  justify-content: space-between;
}

.insurance-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6B7280;
}

.insurance-nav-btn:hover:not(:disabled) {
  background: #f9fafb;
}

.insurance-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.insurance-nav-btn.next {
  background: #1E40AF;
  color: white;
  border-color: #1E40AF;
}

.insurance-nav-btn.next:hover:not(:disabled) {
  background: #1E3A8A;
}

.insurance-nav-btn.next:active:not(:disabled) {
  transform: scale(0.98);
}

.insurance-nav-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Gap Analysis Form
   ========================================================================== */
.gap-form-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.gap-form-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1rem;
}

.gap-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .gap-form-grid {
    grid-template-columns: 1fr;
  }
}

.gap-form-field {
  display: flex;
  flex-direction: column;
}

.gap-form-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
  margin-bottom: 4px;
}

.gap-form-select {
  width: 100%;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.gap-form-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3B82F6;
  border-color: #3B82F6;
}

.gap-analyze-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 1rem;
  padding: 10px 20px;
  background: #1E40AF;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.gap-analyze-btn:hover {
  background: #1E3A8A;
}

.gap-analyze-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Gap Results
   ========================================================================== */
.gap-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Alert header */
.gap-alert-header {
  background: #FEF2F2;
  border: 1px solid #FEE2E2;
  border-radius: 12px;
  padding: 1rem;
}

.gap-alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.gap-alert-title svg {
  color: #DC2626;
  flex-shrink: 0;
}

.gap-alert-title h3 {
  font-size: 14px;
  font-weight: 700;
  color: #DC2626;
  margin: 0;
}

.gap-alert-subtitle {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
}

/* Gap cards */
.gap-card {
  border-radius: 12px;
  border: 1px solid;
  padding: 1rem;
  animation: fadeSlideUp 0.4s ease-out both;
}

.gap-card.critical {
  background: #FEF2F2;
  border-color: #FEE2E2;
}

.gap-card.optional {
  background: #EFF6FF;
  border-color: #DBEAFE;
}

.gap-card-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gap-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gap-card-icon.critical {
  background: #FEE2E2;
  color: #DC2626;
}

.gap-card-icon.optional {
  background: #DBEAFE;
  color: #1E40AF;
}

.gap-card-body {
  flex: 1;
  min-width: 0;
}

.gap-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gap-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.gap-severity-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

.gap-severity-badge.critical {
  background: #FECACA;
  color: #DC2626;
}

.gap-severity-badge.optional {
  background: #BFDBFE;
  color: #1E40AF;
}

.gap-card-explanation {
  font-size: 12px;
  color: #6B7280;
  margin: 4px 0 0;
  line-height: 1.6;
}

.gap-card-impact {
  font-size: 12px;
  font-weight: 600;
  margin: 8px 0 0;
}

.gap-card-impact.critical {
  color: #DC2626;
}

.gap-card-impact.optional {
  color: #1E40AF;
}

/* ==========================================================================
   Product Match Cards
   ========================================================================== */
.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.product-count {
  font-size: 14px;
  color: #6B7280;
  margin: 0;
}

.product-count strong {
  color: #111827;
}

.product-toggle-btn {
  font-size: 12px;
  font-weight: 500;
  color: #1E40AF;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.product-toggle-btn:hover {
  text-decoration: underline;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-grid.compare-mode {
  grid-template-columns: 1fr;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  position: relative;
  background: white;
  animation: fadeSlideUp 0.4s ease-out both;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.product-card.recommended {
  border-color: #1E40AF;
  background: rgba(239, 246, 255, 0.5);
  box-shadow: 0 0 0 1px #1E40AF;
}

.product-badge {
  position: absolute;
  top: -12px;
  left: 16px;
  background: #1E40AF;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.product-name-section {
  /* name block */
}

.product-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.product-carrier {
  font-size: 10px;
  color: #9CA3AF;
  margin: 2px 0 0;
}

.product-premium-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.product-premium-box {
  background: #f9fafb;
  border-radius: 8px;
  padding: 8px;
}

.product-premium-label {
  font-size: 10px;
  color: #6B7280;
  margin: 0;
}

.product-premium-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.product-coverage-value {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.product-highlights {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-highlight-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-highlight-item svg {
  color: #059669;
  flex-shrink: 0;
}

.product-highlight-item span {
  font-size: 12px;
  color: #6B7280;
}

.product-tax-box {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
  border-radius: 8px;
  padding: 8px 12px;
}

.product-tax-box svg {
  color: #059669;
  flex-shrink: 0;
  margin-top: 2px;
}

.product-tax-box p {
  font-size: 10px;
  color: #059669;
  margin: 0;
}

/* ==========================================================================
   Agent Connection Cards
   ========================================================================== */
.agent-card {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  background: white;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 1rem;
}

.agent-card:last-child {
  margin-bottom: 0;
}

.agent-card:hover {
  border-color: #d1d5db;
}

.agent-card.selected {
  border-color: #1E40AF;
  background: rgba(239, 246, 255, 0.3);
  box-shadow: 0 0 0 1px #1E40AF;
}

.agent-card-main {
  display: flex;
  gap: 1rem;
}

.agent-photo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.agent-photo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  flex-shrink: 0;
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.agent-license-row {
  margin-top: 2px;
}

.agent-license-link {
  font-size: 10px;
  color: #1E40AF;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.agent-license-link:hover {
  text-decoration: underline;
}

.agent-specialty {
  font-size: 12px;
  color: #6B7280;
  margin: 4px 0 0;
}

.agent-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.agent-rating-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.agent-star-icon {
  color: #F59E0B;
  fill: #F59E0B;
}

.agent-rating-num {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.agent-review-count {
  font-size: 10px;
  color: #9CA3AF;
}

.agent-experience {
  font-size: 10px;
  color: #6B7280;
}

/* Agent expanded section */
.agent-expanded {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeSlideUp 0.3s ease-out;
}

.agent-consult-label {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  margin: 0;
}

.agent-consult-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.agent-consult-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s;
}

.agent-consult-btn:hover {
  background: #f9fafb;
}

.agent-consult-btn.active {
  border-color: #1E40AF;
  background: #EFF6FF;
  color: #1E40AF;
}

.agent-consult-btn svg {
  width: 20px;
  height: 20px;
}

.agent-consult-btn span {
  font-size: 10px;
  font-weight: 500;
}

.agent-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EFF6FF;
  border-radius: 8px;
  padding: 8px 12px;
}

.agent-notice svg {
  color: #1E40AF;
  flex-shrink: 0;
}

.agent-notice p {
  font-size: 12px;
  color: #1E40AF;
  margin: 0;
}

.agent-initiate-btn {
  width: 100%;
  background: #1E40AF;
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.agent-initiate-btn:hover {
  background: #1E3A8A;
}

.agent-initiate-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Trust Badges (placeholder)
   ========================================================================== */
.insurance-trust-badges {
  /* reserved for future trust badges component */
}
