/**
 * Home Affordability Navigator - Results Display
 * Option C: Summary masthead with program cards
 */

/* ============================================================================
   MASTHEAD - Maximum Buying Power
   ============================================================================ */

.results-masthead {
  background: linear-gradient(135deg, #1a5a7a 0%, #2d7da8 100%);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.masthead-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.masthead-content {
  margin-bottom: 1rem;
}

.masthead-price {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.masthead-program {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.masthead-details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 1rem;
}

.detail-item {
  white-space: nowrap;
}

.detail-sep {
  opacity: 0.5;
}

.masthead-context {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================================================
   PROGRAM CARDS
   ============================================================================ */

.program-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.program-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.program-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.program-card--best {
  border-color: #1a5a7a;
  border-width: 2px;
}

.program-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.program-card--best .program-card__header {
  background: #e8f4f8;
}

.program-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
}

.program-card__badge {
  background: #1a5a7a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.program-card__stats {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  gap: 2rem;
}

.program-card__main-stat {
  flex-shrink: 0;
}

.program-card__main-stat .stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #1a5a7a;
  line-height: 1.1;
}

.program-card__main-stat .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.program-card__secondary-stats {
  display: flex;
  gap: 2rem;
}

.program-card__secondary-stats .stat-item {
  text-align: center;
}

.program-card__secondary-stats .stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.program-card__secondary-stats .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #666;
}

.program-card__rate-info {
  padding: 0 1.5rem 1rem;
  font-size: 0.9rem;
  color: #555;
}

.program-card__rate-info .rate-value {
  font-weight: 600;
  color: #333;
}

.program-card__rate-info .lender-name {
  font-weight: 500;
}

.program-card__rate-info .offer-count {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #888;
}

.program-card__notes {
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.program-card__notes .note {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: #f0f0f0;
  color: #666;
}

.program-card__notes .note--success {
  background: #d4edda;
  color: #155724;
}

.program-card__notes .note--info {
  background: #d1ecf1;
  color: #0c5460;
}

.program-card__notes .note--warning {
  background: #fff3cd;
  color: #856404;
}

.program-card__actions {
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid #1a5a7a;
  color: #1a5a7a;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-all:hover {
  background: #1a5a7a;
  color: #fff;
}

.btn-view-all .arrow {
  transition: transform 0.2s ease;
}

/* ============================================================================
   OFFERS TABLE (Expandable)
   ============================================================================ */

.program-card__offers-table {
  padding: 1rem 1.5rem 1.5rem;
  background: #fafafa;
  border-top: 1px solid #e0e0e0;
}

.offers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.offers-table thead {
  background: #f0f0f0;
}

.offers-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #555;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #ddd;
}

.offers-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e8e8e8;
  vertical-align: middle;
}

.offers-table tr:hover td {
  background: #f5f5f5;
}

.offers-table .col-lender {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offers-table .lender-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.offers-table .lender-name {
  font-weight: 500;
}

.offers-table .col-rate {
  font-weight: 500;
}

.offers-table .rate-type {
  font-weight: 400;
  font-size: 0.75rem;
  color: #888;
}

.offers-table .col-price {
  font-weight: 600;
  color: #1a5a7a;
}

.offers-table .down-pct {
  font-size: 0.75rem;
  color: #888;
  margin-left: 0.25rem;
}

/* ============================================================================
   NO RESULTS MESSAGE
   ============================================================================ */

.no-results-message {
  text-align: center;
  padding: 3rem 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results-message h3 {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.no-results-message p {
  color: #666;
  max-width: 400px;
  margin: 0 auto;
}

/* ============================================================================
   DISCLAIMER
   ============================================================================ */

.results-disclaimer {
  font-size: 0.8rem;
  color: #666;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  margin-top: 1rem;
}

.results-disclaimer p {
  margin: 0;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .masthead-price {
    font-size: 2.25rem;
  }
  
  .masthead-details {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .detail-sep {
    display: none;
  }
  
  .program-card__stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .program-card__secondary-stats {
    width: 100%;
    justify-content: space-around;
  }
  
  .offers-table {
    font-size: 0.75rem;
  }
  
  .offers-table th,
  .offers-table td {
    padding: 0.5rem;
  }
}