/* Credit Utilization Calculator Specific Styles */

/* Helper Text */
.helper-text {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Per-Card Utilization Section - MOVED TO TOP */
.per-card-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.per-card-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #1f2937;
}

.per-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.per-card-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.per-card-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.per-card-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9375rem;
}

.per-card-util {
  font-weight: 700;
  font-size: 1.125rem;
  color: #1f2937;
  text-align: right;
  min-width: 60px;
}

.per-card-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.per-card-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.per-card-fill.status-excellent {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.per-card-fill.status-good {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.per-card-fill.status-moderate {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.per-card-fill.status-high {
  background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
}

.per-card-fill.status-critical {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* Utilization Meter */
.utilization-meter {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.meter-label span:first-child {
  color: #10b981;
}

.meter-label span:nth-child(2) {
  color: #f59e0b;
}

.meter-label span:last-child {
  color: #ef4444;
}

.meter-bar {
  height: 32px;
  background: #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.5rem;
}

.meter-fill {
  height: 100%;
  transition: width 0.6s ease, background 0.6s ease;
  border-radius: 16px;
}

.meter-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
}

/* Credit Score Impact Cards */
.insight-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: white;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.insight-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.insight-content {
  flex: 1;
}

.insight-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: #1f2937;
}

.insight-content p {
  margin: 0.5rem 0;
  color: #4b5563;
  line-height: 1.6;
}

.insight-content .tip {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Impact level styling */
.impact-excellent {
  border-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.impact-good {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.impact-moderate {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.impact-high {
  border-color: #f97316;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.impact-critical {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Utilization Badge */
.utilization-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

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

.status-good {
  background: #dbeafe;
  color: #1e40af;
}

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

.status-high {
  background: #ffedd5;
  color: #9a3412;
}

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

/* Highlight highest utilization card */
.utilization-badge.highest-util {
  animation: pulse-badge 2s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .insight-card {
    flex-direction: column;
  }

  .insight-icon {
    font-size: 2rem;
  }

  .per-card-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .per-card-util {
    text-align: left;
  }

  .utilization-badge {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .per-card-section {
    padding: 1rem;
  }

  .per-card-name {
    font-size: 0.875rem;
  }

  .per-card-util {
    font-size: 1rem;
  }

  .utilization-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}
