/* ==========================================
   KUBEOPT.COM - Component Styles
   Based on aks-cost-optimizer design system
   ========================================== */

/* Card Components - Based on aks-cost-optimizer cards */
.card {
  background: var(--bg-primary, #ffffff);
  border-radius: var(--radius-lg, 0.75rem);
  padding: var(--space-lg, 1.5rem);
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
  border: 1px solid var(--border-color, #e5e7eb);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color, #7FB069) 0%, var(--primary-color-light, #94C37F) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

/* Metric Cards - Matching aks-cost-optimizer dashboard */
.metric-card {
  background: var(--bg-primary, #ffffff);
  padding: 1rem;
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
  border: 1px solid var(--border-color, #e5e7eb);
  transition: all 0.2s ease;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card:hover {
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
  transform: translateY(-1px);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.metric-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.metric-subtitle {
  font-size: 0.75rem;
  color: var(--text-light, #9ca3af);
  font-weight: 400;
  margin-top: 0.1rem;
}

.metric-trend {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.metric-trend.positive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color, #10b981);
}

.metric-trend.negative {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color, #ef4444);
}

/* Chart Cards - Matching aks-cost-optimizer style */
.chart-card {
  background: var(--bg-primary, #ffffff);
  padding: var(--space-lg, 1.5rem);
  border-radius: var(--radius-xl, 1rem);
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
  border: 1px solid var(--border-color, #e5e7eb);
  transition: all 0.3s ease;
}

.chart-card:hover {
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg, 1.5rem);
  padding-bottom: var(--space-md, 1rem);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  overflow: hidden;
}

.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--text-light, #9ca3af);
  font-size: 0.875rem;
}

/* Button Components - Matching aks-cost-optimizer buttons */
.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md, 0.5rem);
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  justify-content: center;
  font-family: inherit;
}

.btn:focus {
  outline: 2px solid var(--primary-color, #7FB069);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary-color, #7FB069);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-color-dark, #6BA055);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
}

.btn-secondary {
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-primary, #111827);
  border: 1px solid var(--border-color, #e5e7eb);
}

.btn-secondary:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--border-color-dark, #d1d5db);
}

.btn-danger {
  background: var(--error-color, #ef4444);
  color: white;
}

.btn-danger:hover {
  background: var(--error-color-dark, #dc2626);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
}

/* Button sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Icon button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-md, 0.5rem);
  background: var(--bg-primary, #ffffff);
  color: var(--text-secondary, #6b7280);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #111827);
  border-color: var(--primary-color, #7FB069);
}

/* Loading state */
.btn.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Badge Components */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(127, 176, 105, 0.1);
  color: var(--primary-color, #7FB069);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color, #10b981);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color, #f59e0b);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color, #ef4444);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info-color, #3b82f6);
}

.badge-gray {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary, #6b7280);
}

/* Icon Components - Matching aks-cost-optimizer tool icons */
.doc-icon,
.contact-icon {
  font-size: 2.5rem;
  color: var(--primary-color, #7FB069);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.doc-icon i,
.contact-icon i {
  font-size: 2.5rem;
  color: var(--primary-color, #7FB069);
  transition: all 0.3s ease;
}

.doc-card:hover .doc-icon i,
.contact-item:hover .contact-icon i {
  transform: scale(1.1);
  color: var(--primary-color-dark, #6BA055);
  filter: drop-shadow(0 4px 8px rgba(127, 176, 105, 0.3));
}

/* Chart header icons */
.chart-header h3 i {
  margin-right: 0.5rem;
  color: var(--primary-color, #7FB069);
  font-size: 1rem;
}

/* Demo title icons */
.demo-title i {
  margin-right: 0.5rem;
  color: var(--primary-color, #7FB069);
}

/* Quick start title icons */
.quick-start-title i {
  margin-right: 0.5rem;
  color: var(--primary-color, #7FB069);
}

/* Download card heading icons */
.download-card h3 i {
  margin-right: 0.5rem;
  color: var(--primary-color, #7FB069);
}

/* Responsive Design */
@media (max-width: 768px) {
  .metric-card {
    padding: 0.75rem;
  }
  
  .chart-card {
    padding: 1rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .doc-icon,
  .contact-icon {
    font-size: 2rem;
  }
  
  .doc-icon i,
  .contact-icon i {
    font-size: 2rem;
  }
}