/* ============================================
   CALCULATOR.CSS — TrueValueTax
   Tax Savings Calculator Tool
   ============================================ */

/* === WRAPPER === */
.calc-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 52px;
  max-width: 840px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* Glow effect top right */
.calc-wrap::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(204, 0, 0, 0.08),
    transparent 70%
  );
  pointer-events: none;
}

/* Glow effect bottom left */
.calc-wrap::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.05),
    transparent 70%
  );
  pointer-events: none;
}

/* === HEADER === */
.calc-top {
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.calc-big-title {
  font-family: var(--font-head);
  font-size: 46px;
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 10px;
  color: var(--white);
}
.calc-big-title span {
  color: var(--yellow);
}

.calc-desc {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.6;
}

/* === FIELDS GRID === */
.calc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

/* === FIELD GROUP === */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.f-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
}

/* === INPUTS === */
.f-input,
.f-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  color: var(--white);
  font-size: 15px;
  font-family: var(--font-body);
  transition: all 0.25s ease;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.f-input:focus,
.f-select:focus {
  outline: none;
  border-color: var(--red);
  background: rgba(204, 0, 0, 0.05);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.f-input::placeholder {
  color: #303050;
}

.f-select option {
  background: var(--navy2);
  color: var(--white);
}

/* Select arrow */
.field-group:has(.f-select) {
  position: relative;
}
.field-group:has(.f-select)::after {
  content: '▾';
  position: absolute;
  bottom: 14px;
  right: 16px;
  color: var(--gray);
  font-size: 14px;
  pointer-events: none;
}

/* === CALCULATE BUTTON === */
.calc-btn {
  width: 100%;
  padding: 20px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-head);
  font-size: 24px;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  z-index: 1;
}

.calc-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.calc-btn:hover {
  background: var(--dred);
  box-shadow: 0 8px 30px var(--glow-red);
  transform: translateY(-2px);
}
.calc-btn:hover::before {
  opacity: 1;
}
.calc-btn:active {
  transform: translateY(0);
}

/* === RESULTS BOX === */
.calc-result {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.5s ease;
  background: rgba(204, 0, 0, 0.06);
  border: 1px solid rgba(204, 0, 0, 0.25);
  border-radius: var(--r-md);
  padding: 30px;
  position: relative;
  z-index: 1;
}

.calc-result.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* === RESULT HEADER === */
.result-head {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--yellow);
  margin-bottom: 22px;
}

/* === RESULT GRID === */
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* === RESULT ITEM === */
.r-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--r-sm);
  padding: 18px 16px;
  transition: all var(--t-fast);
}
.r-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.r-item.highlight {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.r-label {
  font-size: 11px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* === RESULT VALUES === */
.r-val {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1;
}

.r-val.yellow    { color: var(--yellow); }
.r-val.green     { color: #00DD77; }
.r-val.red       { color: var(--red); }
.r-val.big-yellow {
  color: var(--yellow);
  font-size: 36px;
}

/* === RESULT NOTE === */
.result-note {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--gray);
  line-height: 1.75;
}

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .calc-wrap {
    padding: 32px 24px;
  }
  .calc-fields {
    grid-template-columns: 1fr;
  }
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
  .calc-big-title {
    font-size: 36px;
  }
}

@media (max-width: 500px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
}