/**
 * Insurance Matchmaker Styling
 * Styles for insurer recommendations in coverage table
 */

/* Insurer recommendations cell */
.insurer-recommendations-cell {
  min-width: 280px;
  padding: 12px;
  vertical-align: top;
}

.insurer-loading,
.insurer-no-matches,
.insurer-error {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.insurer-loading {
  background: #f3f4f6;
  color: #6b7280;
  animation: pulse 1.5s ease-in-out infinite;
}

.insurer-no-matches {
  background: #fef3c7;
  color: #92400e;
}

.insurer-error {
  background: #fee2e2;
  color: #991b1b;
}

/* Insurer matches container */
.insurer-matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual insurer match */
.insurer-match {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  transition: all 0.2s ease;
}

.insurer-match:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Insurer match header */
.insurer-match-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.insurer-rank {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  min-width: 18px;
}

.insurer-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.insurer-fit {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.insurer-fit.fit-high {
  background: #d1fae5;
  color: #065f46;
}

.insurer-fit.fit-medium {
  background: #fef3c7;
  color: #92400e;
}

.insurer-fit.fit-low {
  background: #fee2e2;
  color: #991b1b;
}

/* Insurer rationale */
.insurer-rationale {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  padding-left: 26px;
}

.insurer-product {
  font-size: 12px;
  color: #111827;
  margin-top: 4px;
  padding-left: 26px;
  font-weight: 500;
}

.insurer-premium {
  font-size: 12px;
  color: #111827;
  margin-top: 4px;
  padding-left: 26px;
  font-weight: 500;
}

/* Pulse animation for loading state */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Coverage table adjustments */
.coverage-table th:last-child,
.coverage-table td:last-child {
  min-width: 280px;
}

/* Appetite Matching Styles */
.appetite-insurer-matches {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appetite-insurer-match {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.appetite-insurer-match:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.appetite-insurer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.insurer-fit-score {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.insurer-fit-score.fit-high {
  background: #d1fae5;
  color: #065f46;
}

.insurer-fit-score.fit-medium {
  background: #fef3c7;
  color: #92400e;
}

.insurer-fit-score.fit-low {
  background: #fee2e2;
  color: #991b1b;
}

.insurer-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.insurer-status.status-accept {
  background: #d1fae5;
  color: #065f46;
}

.insurer-status.status-refer {
  background: #fef3c7;
  color: #92400e;
}

.insurer-status.status-decline {
  background: #fee2e2;
  color: #991b1b;
}

.insurer-premium-estimate {
  font-size: 13px;
  color: #111827;
  margin-top: 6px;
  padding-left: 26px;
  font-weight: 600;
}

.insurer-complexity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-top: 6px;
  padding-left: 26px;
}

.complexity-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.complexity-green .complexity-indicator {
  background: #10b981;
}

.complexity-amber .complexity-indicator,
.complexity-medium .complexity-indicator {
  background: #f59e0b;
}

.complexity-red .complexity-indicator {
  background: #ef4444;
}

.complexity-text {
  color: #4b5563;
  font-weight: 500;
}

.insurer-advantages {
  font-size: 12px;
  color: #059669;
  margin-top: 6px;
  padding-left: 26px;
  line-height: 1.5;
}

.insurer-advantages strong {
  color: #047857;
  font-weight: 600;
}

.insurer-referrals {
  font-size: 12px;
  color: #d97706;
  margin-top: 6px;
  padding-left: 26px;
  line-height: 1.5;
}

.insurer-referrals strong {
  color: #b45309;
  font-weight: 600;
}

.insurer-alignment {
  font-size: 12px;
  color: #4b5563;
  margin-top: 6px;
  padding-left: 26px;
  line-height: 1.5;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .insurer-recommendations-cell {
    min-width: 240px;
  }
  
  .coverage-table th:last-child,
  .coverage-table td:last-child {
    min-width: 240px;
  }
}

@media (max-width: 768px) {
  .insurer-match,
  .appetite-insurer-match {
    padding: 8px;
  }
  
  .insurer-name {
    font-size: 13px;
  }
  
  .insurer-fit,
  .insurer-fit-score {
    font-size: 12px;
    padding: 2px 6px;
  }
  
  .insurer-rationale {
    font-size: 11px;
    padding-left: 20px;
  }
  
  .appetite-insurer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .insurer-premium-estimate,
  .insurer-complexity,
  .insurer-advantages,
  .insurer-referrals,
  .insurer-alignment {
    padding-left: 0;
  }
}
