/* ================================================
   Polza Calculator — Summary & Results Styles
   ================================================ */

/* ── Summary Section ────────────────────── */

.summary {
  margin-top: var(--space-6);
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--space-4);
}
.summary .summary-c1 {
  width: 60%;
  padding: var(--space-8);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-smooth);
}
.summary .summary-c1:hover {
  box-shadow: var(--shadow-hover);
}
.summary .summary-c1 .summary-c1-1 {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
}

/* Results title */
.results-title {
  width: 100%;
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: -0.3px;
}

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.result-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.result-card--success {
  background: var(--color-bg-mint);
  border-color: var(--color-primary);
}
.result-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-value {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: -0.3px;
}
.result-card--success .result-value {
  color: var(--color-primary);
}

/* Result banners */
.result-banner {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}
.result-banner p {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-relaxed);
}
.result-banner--win {
  background: var(--color-bg-mint);
  border: 1px solid var(--color-primary);
}
.result-banner--win p {
  color: #00796B;
}
.result-banner--warning {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
}
.result-banner--warning p {
  color: var(--color-warning-text);
}

.result-remember {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

@media only screen and (max-width: 743.98px) {
  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }
  .result-card {
    padding: var(--space-3);
  }
  .result-label {
    font-size: 10px;
  }
  .result-value {
    font-size: var(--text-lg);
  }
  .results-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
  }
  .summary .summary-c1 {
    padding: var(--space-5);
  }
  .result-banner {
    padding: var(--space-2) var(--space-3);
  }
  .result-banner p {
    font-size: 12px;
  }
  .result-remember {
    font-size: 12px;
  }
}

/* ── Summary Column 2 (Educational + Quote) ─ */

.summary .summary-c2 {
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
}
.summary .summary-c2 .summary-c2-1 {
  padding: var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.summary .summary-c2 .summary-c2-1 p:last-child {
  margin-bottom: 0;
}
.summary .summary-c2 .summary-c2-2 {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.summary .summary-c2 .summary-c2-2 > img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}
.summary .summary-c2 .summary-c2-2 .summary-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.5;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  letter-spacing: 0.1px;
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-4);
}
.summary .summary-c2 .summary-c2-2 .summary-quote span:nth-child(2) {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}
@media only screen and (max-width: 1279.98px) {
  .summary {
    flex-direction: column;
    margin-top: var(--space-10);
  }
  .summary .summary-c1 {
    width: 100%;
  }
  .summary .summary-c2 {
    width: 100%;
  }
  .summary .summary-c2 .summary-c2-2 .summary-quote span:nth-child(2) {
    padding-bottom: var(--space-3);
  }
}
@media only screen and (max-width: 743.98px) {
  .summary {
    margin-top: var(--space-8);
    gap: var(--space-3);
  }
  .summary .summary-c2 .summary-c2-1 {
    padding: var(--space-4);
    font-size: var(--text-sm);
  }
  .summary .summary-c2 {
    gap: var(--space-3);
  }
}

/* ── Form 2 Section ─────────────────────── */

.form2-title {
  margin-top: var(--space-25);
  text-align: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.3px;
}
@media only screen and (max-width: 1279.98px) {
  .form2-title {
    margin-top: var(--space-20);
  }
}

/* Form 2 Results */
.form2-results {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.form2-result-item {
  text-align: center;
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.form2-result-item .label {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}
.form2-result-item .value {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
}
.form2-result-item .value--simple {
  color: #EF4444;
}
.form2-result-item .value--compound {
  color: #1EBE73;
}

/* ── Form 2 Slider Styles ──────────────── */

#years_slider .noUi-tooltip {
  background: #3d83db;
}
#years_slider .noUi-tooltip::after {
  background: #3d83db;
}
#years_slider.noUi-target .noUi-base,
#years_slider.noUi-target .noUi-connects {
  z-index: auto;
}
#years_slider.noUi-target .noUi-handle {
  z-index: 2;
}
#years_slider .noUi-pips-horizontal .noUi-marker:first-child,
#years_slider .noUi-pips-horizontal .noUi-marker:nth-child(11) {
  display: none;
}
#years_slider .noUi-pips-horizontal .noUi-marker.noUi-marker-normal {
  display: none;
}
#years_slider .noUi-pips-horizontal .noUi-marker.noUi-marker-large {
  z-index: 1;
}
#years_slider .noUi-pips-horizontal .noUi-value {
  top: 14px;
}
#years_slider .noUi-pips-horizontal .noUi-value:nth-child(2) {
  left: 1% !important;
}
#years_slider .noUi-pips-horizontal .noUi-value:nth-child(12) {
  left: 99% !important;
}
#years_slider .noUi-pips-horizontal .noUi-value.noUi-value-large,
#years_slider .noUi-pips-horizontal .noUi-value.noUi-value-sub {
  color: var(--color-text-muted);
  font-size: 10px;
}

#simple_rate_slider .noUi-tooltip {
  background: #EF4444;
}
#simple_rate_slider .noUi-tooltip::after {
  background: #EF4444;
}
#simple_rate_slider.noUi-target .noUi-connect,
#simple_rate_slider.noUi-target .noUi-handle {
  background: #EF4444;
}
#simple_rate_slider.noUi-target .noUi-base,
#simple_rate_slider.noUi-target .noUi-connects {
  z-index: auto;
}
#simple_rate_slider.noUi-target .noUi-handle {
  z-index: 2;
}
#simple_rate_slider.noUi-target .noUi-handle .noUi-tooltip {
  width: 36px;
}
#simple_rate_slider.noUi-target .noUi-handle .noUi-tooltip::after {
  left: 24%;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-marker:first-child,
#simple_rate_slider .noUi-pips-horizontal .noUi-marker:nth-child(11) {
  display: none;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-marker.noUi-marker-normal {
  display: none;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-marker.noUi-marker-large {
  z-index: 1;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-value {
  top: 14px;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-value:nth-child(2) {
  left: 1% !important;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-value:nth-child(12) {
  left: 99% !important;
}
#simple_rate_slider .noUi-pips-horizontal .noUi-value.noUi-value-large,
#simple_rate_slider .noUi-pips-horizontal .noUi-value.noUi-value-sub {
  color: var(--color-text-muted);
  font-size: 10px;
}

#compound_rate_slider .noUi-tooltip {
  background: #1EBE73;
}
#compound_rate_slider .noUi-tooltip::after {
  background: #1EBE73;
}
#compound_rate_slider.noUi-target .noUi-connect,
#compound_rate_slider.noUi-target .noUi-handle {
  background: #1EBE73;
}
#compound_rate_slider.noUi-target .noUi-base,
#compound_rate_slider.noUi-target .noUi-connects {
  z-index: auto;
}
#compound_rate_slider.noUi-target .noUi-handle {
  z-index: 2;
}
#compound_rate_slider.noUi-target .noUi-handle .noUi-tooltip {
  width: 36px;
}
#compound_rate_slider.noUi-target .noUi-handle .noUi-tooltip::after {
  left: 24%;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-marker:first-child,
#compound_rate_slider .noUi-pips-horizontal .noUi-marker:nth-child(11) {
  display: none;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-marker.noUi-marker-normal {
  display: none;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-marker.noUi-marker-large {
  z-index: 1;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-value {
  top: 14px;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-value:nth-child(2) {
  left: 1% !important;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-value:nth-child(12) {
  left: 99% !important;
}
#compound_rate_slider .noUi-pips-horizontal .noUi-value.noUi-value-large,
#compound_rate_slider .noUi-pips-horizontal .noUi-value.noUi-value-sub {
  color: var(--color-text-muted);
  font-size: 10px;
}

/* ── Chart 2 ────────────────────────────── */

.chart2-col {
  padding: var(--space-8);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chart2-col > div {
  flex: 1;
}
.chart2-col canvas {
  width: 100% !important;
}
@media only screen and (max-width: 743.98px) {
  .chart2-col {
    padding: var(--space-4) var(--space-3);
    min-height: 280px;
  }
}

/* ── Methodology Section ────────────────── */

.methodology {
  margin-top: var(--space-10);
  padding: var(--space-6);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.methodology-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: 0;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.methodology-title.open {
  margin-bottom: var(--space-4);
}
.methodology-title::after {
  content: '+';
  font-size: var(--text-xl);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-left: var(--space-4);
}
.methodology-title.open::after {
  content: '−';
}
@media only screen and (max-width: 743.98px) {
  .methodology {
    margin-top: var(--space-10);
    padding: var(--space-5);
  }
  .methodology-title {
    font-size: var(--text-lg);
  }
}
.methodology-content {
  display: none;
  padding-top: var(--space-3);
}
.methodology-content.open {
  display: block;
  animation: polza-fadeUp 0.3s ease-out;
}
.methodology-content p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}
.methodology-content code {
  display: inline-block;
  padding: 2px 6px;
  background: var(--color-bg);
  border-radius: 4px;
  font-size: 12px;
  color: var(--color-text);
}

/* ── Animations ─────────────────────────── */

@keyframes polza-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes polza-pulse {
  0%, 8%  { transform: scale(1); box-shadow: 0 4px 15px var(--color-primary-glow); }
  4%      { transform: scale(1.04); box-shadow: 0 0 20px 8px var(--color-primary-glow); }
  100%    { transform: scale(1); box-shadow: 0 4px 15px var(--color-primary-glow); }
}
