/* BF Financing Calculator */

.bf-calc-card {
  max-width: 520px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.15),
    0 20px 60px rgba(0,0,0,0.3);
  transition: max-width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bf-calc-card.is-expanded {
  max-width: 980px;
}

@media (min-width: 768px) {
  .bf-calc-card { flex-direction: row; }
}

/* ── Inputs Panel ── */
.bf-calc-inputs {
  flex: 0 0 auto;
  width: 100%;
  background: #ffffff;
  padding: 32px 24px;
}

@media (min-width: 640px) {
  .bf-calc-inputs { padding: 40px 36px; }
}

@media (min-width: 768px) {
  .bf-calc-inputs { width: 520px; padding: 36px 40px; }
}

.bf-calc-label {
  display: block;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #141414;
  margin-bottom: 8px;
}

.bf-calc-money-wrap {
  position: relative;
  margin-bottom: 6px;
}

.bf-calc-money-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Figtree', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: rgba(20,20,20,0.3);
  pointer-events: none;
}

.bf-calc-money-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 34px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #141414;
  background: transparent;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bf-calc-money-input:hover {
  border-color: #c5c8ce;
}

.bf-calc-money-input:focus {
  border-color: #1A748A;
  box-shadow: 0 0 0 3px rgba(26,116,138,0.1);
}

.bf-calc-money-input::placeholder {
  color: rgba(20,20,20,0.25);
  font-weight: 400;
}

/* Range slider */
.bf-calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  margin-bottom: 4px;
  background: #e5e7eb;
}

.bf-calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1A748A;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(10,46,74,0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bf-calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 12px rgba(10,46,74,0.35);
}

.bf-calc-range::-webkit-slider-thumb:active {
  transform: scale(1.05);
}

.bf-calc-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1A748A;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(10,46,74,0.25);
  cursor: pointer;
}

.bf-calc-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: rgba(20,20,20,0.4);
  margin-bottom: 20px;
}

/* Pill button group */
.bf-calc-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.bf-calc-pills:last-child {
  margin-bottom: 0;
}

.bf-calc-pill {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 10px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: #f3f4f6;
  color: #141414;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.bf-calc-pill:hover {
  background: #e8eaed;
}

.bf-calc-pill:focus-visible {
  outline: 2px solid #1A748A;
  outline-offset: 2px;
}

.bf-calc-pill:active {
  transform: scale(0.97);
}

.bf-calc-pill--active {
  background: #1A748A;
  color: #ffffff;
}

.bf-calc-pill--active:hover {
  background: #165f73;
}

/* Calculate button (left side, reveals results) */
.bf-calc-calculate-btn {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 20px;
  border: none;
  border-radius: 50px;
  font-family: 'Figtree', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(160deg, #5BC1A2 0%, #1A748A 100%);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(91,193,162,0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bf-calc-calculate-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.bf-calc-calculate-btn:focus-visible {
  outline: 3px solid #5BC1A2;
  outline-offset: 3px;
}

.bf-calc-calculate-btn:active {
  transform: translateY(0);
}

.bf-calc-calculate-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.bf-calc-calculate-btn:disabled:hover {
  transform: none;
}

/* ── Results Panel ── */
.bf-calc-results {
  background: #0A2E4A;
  box-sizing: border-box;
  flex: 0 0 0;
  width: auto;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  transition:
    max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    flex-basis 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease 0.15s;
}

.bf-calc-results.is-visible {
  max-height: 900px;
  flex-basis: auto;
  opacity: 1;
}

@media (min-width: 768px) {
  .bf-calc-results {
    flex: 0 0 0;
    max-height: none;
  }

  .bf-calc-results.is-visible {
    flex-basis: 460px;
  }
}

.bf-calc-results-inner {
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .bf-calc-results-inner { padding: 40px 36px; }
}

@media (min-width: 768px) {
  .bf-calc-results-inner { width: 460px; }
}

.bf-calc-headline {
  font-family: 'Figtree', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 4px;
  text-align: center;
}

.bf-calc-sub {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 24px;
  text-align: center;
}

.bf-calc-result-box {
  background: rgba(3,3,3,0.2);
  border: 1px solid rgba(171,254,228,0.14);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.bf-calc-range-value {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  color: #5BC1A2;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.bf-calc-note {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: #ffffff;
  line-height: 1.55;
}

.bf-calc-cta-area {
  margin-top: 32px;
}

.bf-calc-cta-btn {
  display: block;
  width: 100%;
  height: 52px;
  line-height: 52px;
  border: none;
  border-radius: 50px;
  font-family: 'Figtree', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(160deg, #5BC1A2 0%, #1A748A 100%);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(91,193,162,0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.bf-calc-cta-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
  color: #ffffff;
}

.bf-calc-cta-btn:focus-visible {
  outline: 3px solid #5BC1A2;
  outline-offset: 3px;
}

.bf-calc-cta-btn:active {
  transform: translateY(0);
}

.bf-calc-disclaimer {
  margin-top: 16px;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.5;
}
