/* ==============================
   CALCULATOR PAGE
   ============================== */

.calc-hero {
  padding: 120px 0 48px;
  background: var(--black);
}

.calc-hero__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.calc-hero__desc {
  font-size: 1.05rem;
  color: var(--gray-40);
  max-width: 600px;
  line-height: 1.6;
}

/* Layout */
.calc-section {
  padding: 0 0 80px;
  background: var(--black);
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .calc-layout {
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
  }
}

/* ===== LEFT: Parameters ===== */
.calc-params {
  padding: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.calc-params__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 32px;
}

.calc-field {
  margin-bottom: 24px;
}

.calc-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-40);
  margin-bottom: 10px;
}

.calc-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.calc-input::placeholder {
  color: var(--gray-30);
}

.calc-input:focus {
  border-color: rgba(160, 32, 32, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(160, 32, 32, 0.1);
}

/* Remove spinner from number inputs */
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc-input[type=number] { -moz-appearance: textfield; }

.calc-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .calc-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Button group */
.calc-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gray-40);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.calc-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.calc-btn.active {
  background: rgba(160, 32, 32, 0.15);
  border-color: rgba(160, 32, 32, 0.4);
  color: #e04040;
}

/* Included items */
.calc-included {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.calc-included h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 24px;
}

.calc-included__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .calc-included__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.calc-included__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.calc-included__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(160, 32, 32, 0.1);
  border: 1px solid rgba(160, 32, 32, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e04040;
}

.calc-included__item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.calc-included__item p {
  font-size: 0.78rem;
  color: var(--gray-30);
  line-height: 1.5;
}

/* ===== RIGHT: Result Card ===== */
.calc-result {
  position: sticky;
  top: 100px;
}

.calc-result__card {
  position: relative;
  padding: 32px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.calc-result__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 28px;
}

.calc-result__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.calc-result__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.calc-result__row span:first-child {
  font-size: 0.88rem;
  color: var(--gray-40);
}

.calc-result__val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  transition: all 0.3s ease;
}

/* Total */
.calc-result__total-wrap {
  padding-top: 20px;
  margin-top: 8px;
}

.calc-result__total-row {
  margin-bottom: 8px;
}

.calc-result__total-row span {
  font-size: 0.82rem;
  color: var(--gray-40);
}

.calc-result__total {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.calc-result__note {
  font-size: 0.72rem;
  color: var(--gray-30);
  line-height: 1.5;
  margin-top: 12px;
}

/* ===== Blur Overlay ===== */
.calc-result__overlay {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 5, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.calc-result__overlay.visible {
  opacity: 1;
  visibility: visible;
}

.calc-result__overlay-content {
  text-align: center;
  padding: 24px;
  max-width: 280px;
}

.calc-result__lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(160, 32, 32, 0.12);
  border: 1px solid rgba(160, 32, 32, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e04040;
  margin: 0 auto 16px;
}

.calc-result__overlay-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.calc-result__overlay-content p {
  font-size: 0.82rem;
  color: var(--gray-40);
  line-height: 1.5;
  margin-bottom: 20px;
}

.calc-overlay__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  text-align: center;
  outline: none;
  transition: all 0.25s ease;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.calc-overlay__input::placeholder {
  color: var(--gray-30);
}

.calc-overlay__input:focus {
  border-color: rgba(160, 32, 32, 0.4);
  box-shadow: 0 0 0 3px rgba(160, 32, 32, 0.1);
}

.calc-overlay__btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #a02020, #8a1a1a);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(160, 32, 32, 0.3);
}

.calc-overlay__btn:hover {
  background: linear-gradient(135deg, #b82525, #a02020);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(160, 32, 32, 0.4);
}

.calc-overlay__btn span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.calc-overlay__btn:hover span {
  transform: translateX(3px);
}

/* Success */
.calc-result__success {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 5, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  text-align: center;
  padding: 32px;
  animation: fadeIn 0.3s ease;
}

.calc-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 2px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #22c55e;
  margin-bottom: 16px;
}

.calc-result__success h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.calc-result__success p {
  font-size: 0.88rem;
  color: var(--gray-40);
  line-height: 1.5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
