/* Production Stylesheet for VanJS PPC Budget Waste Calculator Component */

.ppc-calc-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0;
  width: 100%;
  box-sizing: border-box;
}

/* Header Styling */
.ppc-calc-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.ppc-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.ppc-title {
  font-size: clamp(1.4rem, 5vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 0.75rem 0;
  line-height: 1.25;
}

.ppc-subtitle {
  font-size: clamp(0.875rem, 3.2vw, 1.1rem);
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Grid Layout */
.ppc-calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 960px) {
  .ppc-calc-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Cards Styling */
.ppc-controls-card, .ppc-results-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 640px) {
  .ppc-controls-card, .ppc-results-card {
    padding: 1.25rem 1rem;
    border-radius: 18px;
  }
}

.ppc-card-title {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  color: #ffffff;
}

/* System Insight Banner */
.ppc-insight-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 1.15rem;
  margin-bottom: 1.5rem;
}

.ppc-insight-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
}

.ppc-insight-body {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.55;
}

/* Section Blocks */
.ppc-section-block {
  margin-bottom: 1.75rem;
}

.ppc-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f59e0b;
  margin: 0 0 1rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Form Controls */
.ppc-form-group {
  margin-bottom: 1.25rem;
}

.ppc-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.4rem;
}

.ppc-select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.ppc-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Custom Sliders */
.ppc-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ppc-value-display {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f59e0b;
}

.ppc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(51, 65, 85, 0.8);
  outline: none;
  margin: 0.4rem 0;
  cursor: pointer;
}

.ppc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ppc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.ppc-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Leak Diagnostic Cards */
.ppc-leak-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.ppc-leak-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

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

.ppc-leak-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-w: 0;
}

.ppc-leak-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.ppc-leak-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.ppc-select-sm {
  padding: 0.35rem 0.6rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f59e0b;
  font-size: 0.775rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  max-width: 100%;
}

.ppc-leak-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

/* Results Card Elements */
.ppc-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ppc-tag-danger {
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Metrics Boxes */
.ppc-metrics-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ppc-metric-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.1rem;
  transition: transform 0.2s;
  box-sizing: border-box;
}

.ppc-metric-box.highlight-box {
  background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.12), transparent 70%), rgba(30, 41, 59, 0.8);
  border-color: rgba(248, 113, 113, 0.3);
}

.ppc-metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ppc-metric-value {
  font-family: "Sora", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  margin: 0.25rem 0;
  line-height: 1.1;
}


.danger-text {
  color: #f87171;
}

.warning-text {
  color: #f59e0b;
}

.ppc-metric-sub {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* Breakdown Drivers */
.ppc-breakdown {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
}

.ppc-breakdown-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f59e0b;
  margin: 0 0 0.75rem 0;
}

.ppc-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ppc-breakdown-item {
  display: flex;
  gap: 0.65rem;
  font-size: 0.825rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.ppc-icon-alert {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* CTA Button - Responsive & Overflow Safe */
.ppc-cta-box {
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.ppc-btn-primary {
  display: block;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
  width: 100%;
  max-width: 100%;
  padding: 0.95rem 1.15rem;
  background-color: #fbbf24;
  border: none;
  border-radius: 9999px;
  color: #020617;
  font-size: clamp(0.85rem, 3.8vw, 1.05rem);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.ppc-btn-primary:hover {
  background-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(251, 191, 36, 0.5);
}


.ppc-cta-note {
  font-size: 0.775rem;
  color: #94a3b8;
  margin-top: 0.65rem;
  line-height: 1.4;
}
