.cpsc-savings-calculator {
  --cpsc-savings-bg: #27344a;
  --cpsc-savings-accent: #f1be73;
  --cpsc-savings-white: #ffffff;
  --cpsc-savings-dark: #0d1b33;
  --cpsc-savings-muted: rgba(255, 255, 255, 0.78);
  box-sizing: border-box;
  width: 100%;
  padding: 44px 60px;
  background: var(--cpsc-savings-bg);
  color: var(--cpsc-savings-white);
  overflow: hidden;
}

.cpsc-savings-calculator *,
.cpsc-savings-calculator *::before,
.cpsc-savings-calculator *::after {
  box-sizing: border-box;
}

.cpsc-savings-title {
  margin: 0 0 34px;
  color: var(--cpsc-savings-white);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-align: center;
}

.cpsc-savings-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(34px, 7vw, 110px);
  width: 100%;
}

.cpsc-savings-left {
  flex: 0 1 42%;
  min-width: 300px;
}

.cpsc-savings-right {
  flex: 1 1 58%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cpsc-savings-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.cpsc-savings-field label {
  display: block;
  margin: 0 0 12px;
  color: var(--cpsc-savings-white);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.cpsc-savings-input-shell {
  min-height: 56px;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.cpsc-savings-input-shell:focus-within {
  border-color: var(--cpsc-savings-accent);
  box-shadow: 0 0 0 4px rgba(241, 190, 115, 0.22);
}

.cpsc-savings-input-shell input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 12px !important;
  color: #0d1b33;
  font-size: 18px;
  line-height: 1;
  appearance: textfield;
}

.cpsc-savings-input-shell input::-webkit-outer-spin-button,
.cpsc-savings-input-shell input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cpsc-input-prefix,
.cpsc-input-suffix {
  flex: 0 0 auto;
  color: #8a94a6;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.cpsc-input-prefix {
  padding-left: 12px;
}

.cpsc-input-suffix {
  padding-right: 12px;
}

.cpsc-savings-fees {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
  text-align: center;
}

.cpsc-savings-fee-box h3,
.cpsc-savings-result-heading {
  margin: 0 0 8px;
  color: var(--cpsc-savings-white);
  font-size: 24px;
  line-height: 1.16;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.cpsc-savings-fee-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cpsc-savings-fee-value strong {
  display: block;
  color: var(--cpsc-savings-white);
  font-size: clamp(38px, 4vw, 48px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.cpsc-savings-fee-value span {
  display: block;
  color: var(--cpsc-savings-white);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.05;
  text-align: left;
}

.cpsc-savings-note {
  max-width: 440px;
  margin: 42px auto 0;
  color: var(--cpsc-savings-white);
  font-size: 15px;
  line-height: 1.15;
  text-align: center;
}

.cpsc-savings-result-heading {
  margin-bottom: 10px;
  font-size: clamp(22px, 2.4vw, 30px);
}

.cpsc-savings-result-amount {
  color: var(--cpsc-savings-accent);
  font-size: clamp(76px, 9vw, 126px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.07em;
  margin-bottom: 24px;
}

.cpsc-savings-prize {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--cpsc-savings-white);
  font-size: clamp(18px, 2.1vw, 27px);
  line-height: 1.2;
  margin-bottom: 24px;
}

.cpsc-savings-prize-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  line-height: 1;
}

.cpsc-savings-prize-icon img {
  display: block;
  width: 38px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.cpsc-savings-slider-wrap {
  width: 100%;
  max-width: 590px;
  margin: 0 auto;
}

.cpsc-year-range {
  --cpsc-slider-progress: 25%;
  --cpsc-slider-active: var(--cpsc-savings-accent);
  --cpsc-slider-track: rgba(255, 255, 255, 0.72);
  --cpsc-slider-thumb: var(--cpsc-savings-accent);
  width: 100%;
  height: 28px;
  background: transparent;
  appearance: none;
  cursor: pointer;
  display: block;
}

.cpsc-year-range:focus {
  outline: none;
}

.cpsc-year-range::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--cpsc-slider-active) 0%, var(--cpsc-slider-active) var(--cpsc-slider-progress), var(--cpsc-slider-track) var(--cpsc-slider-progress), var(--cpsc-slider-track) 100%);
}

.cpsc-year-range::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: var(--cpsc-slider-track);
}

.cpsc-year-range::-moz-range-progress {
  height: 12px;
  border-radius: 999px;
  background: var(--cpsc-slider-active);
}

.cpsc-year-range::-webkit-slider-thumb {
  width: 32px;
  height: 32px;
  margin-top: -10px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: var(--cpsc-slider-thumb);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
  appearance: none;
}

.cpsc-year-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: var(--cpsc-slider-thumb);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
}

.cpsc-savings-year-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.cpsc-year-label {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cpsc-savings-white);
  padding: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.cpsc-year-label:hover,
.cpsc-year-label:focus,
.cpsc-year-label.is-active {
  color: var(--cpsc-savings-accent);
  outline: none;
}

.cpsc-year-label:active {
  transform: translateY(1px);
}

.cpsc-savings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 38px;
  min-width: 176px;
  padding: 14px 28px;
  border-radius: 4px;
  background: var(--cpsc-savings-accent);
  color: #0d1b33;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cpsc-savings-button:hover,
.cpsc-savings-button:focus {
  color: var(--cpsc-savings-accent);
  filter: brightness(0.96);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.elementor-widget-cpsc_savings_calculator .cpsc-savings-calculator,
.elementor-widget-cpsc_savings_calculator .cpsc-savings-input-shell,
.elementor-widget-cpsc_savings_calculator .cpsc-savings-button,
.elementor-widget-cpsc_savings_calculator .cpsc-year-range,
.elementor-widget-cpsc_savings_calculator .cpsc-savings-result-amount {
  transition: all 0.25s ease;
}

@media (max-width: 1024px) {
  .cpsc-savings-calculator {
    padding: 42px 30px;
  }

  .cpsc-savings-grid {
    gap: 44px;
  }

  .cpsc-savings-left,
  .cpsc-savings-right {
    min-width: 0;
  }

  .cpsc-savings-input-grid {
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .cpsc-savings-calculator {
    padding: 38px 18px;
  }

  .cpsc-savings-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 38px;
  }

  .cpsc-savings-left,
  .cpsc-savings-right {
    flex-basis: auto !important;
    width: 100%;
  }

  .cpsc-savings-input-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cpsc-savings-fees {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
  }

  .cpsc-savings-fee-box h3 {
    font-size: 21px;
  }

  .cpsc-savings-fee-value strong {
    font-size: 38px;
  }

  .cpsc-savings-fee-value span {
    font-size: 13px;
  }

  .cpsc-savings-note {
    margin-top: 30px;
    font-size: 14px;
  }

  .cpsc-savings-result-amount {
    font-size: clamp(66px, 18vw, 88px);
  }

  .cpsc-savings-prize {
    font-size: 20px;
    flex-wrap: wrap;
  }

  .cpsc-year-label {
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .cpsc-savings-calculator {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cpsc-savings-fees {
    gap: 10px;
  }

  .cpsc-savings-fee-box h3 {
    font-size: 18px;
  }

  .cpsc-savings-fee-value {
    gap: 5px;
  }

  .cpsc-savings-fee-value strong {
    font-size: 34px;
  }

  .cpsc-savings-fee-value span {
    font-size: 12px;
  }

  .cpsc-savings-result-heading {
    font-size: 20px;
  }

  .cpsc-savings-result-amount {
    font-size: 60px;
  }

  .cpsc-savings-year-labels {
    gap: 6px;
  }

  .cpsc-year-label {
    font-size: 15px;
  }
}
