.avico-estimator,
.avico-estimator *,
.avico-estimator *::before,
.avico-estimator *::after {
  box-sizing: border-box;
}

.avico-estimator {
  --avico-estimator-orange: #ef3b1f;
  --avico-estimator-orange-dark: #d92d17;
  --avico-estimator-text: #121826;
  --avico-estimator-muted: #667085;
  --avico-estimator-border: #e9edf3;
  --avico-estimator-soft: #f8fafc;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--avico-estimator-text);
  font-family: Arial, Helvetica, sans-serif;
}

.avico-estimator button,
.avico-estimator input,
.avico-estimator select {
  font-family: inherit;
}

.avico-estimator__top {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(280px, 1fr) minmax(280px, 0.92fr);
  gap: 18px;
  align-items: stretch;
}

.avico-estimator__card,
.avico-estimator__detail {
  background: #ffffff;
  border: 1px solid var(--avico-estimator-border);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.avico-estimator__card {
  min-height: 315px;
  padding: 24px;
}

.avico-estimator__controls {
  display: grid;
  gap: 18px;
  align-content: start;
}

.avico-estimator__controls label {
  display: grid;
  gap: 9px;
  margin: 0;
  color: var(--avico-estimator-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.avico-estimator__controls input,
.avico-estimator__controls select {
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #e0e6ef;
  border-radius: 7px;
  background: #ffffff;
  color: var(--avico-estimator-text);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  box-shadow: none;
}

.avico-estimator__controls select {
  font-weight: 600;
}

.avico-estimator__controls input:focus,
.avico-estimator__controls select:focus {
  border-color: var(--avico-estimator-orange);
  box-shadow: 0 0 0 3px rgba(239, 59, 31, 0.12);
}

.avico-estimator__calculate {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #ff4a24 0%, #eb2f18 100%);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  box-shadow: 0 12px 20px rgba(239, 59, 31, 0.18);
}

.avico-estimator__calculate:hover {
  background: linear-gradient(180deg, #ff572e 0%, #dc2a15 100%);
  color: #ffffff;
}

.avico-estimator__recommendation h2,
.avico-estimator__total h2,
.avico-estimator__detail h2 {
  margin: 0;
  color: var(--avico-estimator-text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.avico-estimator__summary,
.avico-estimator__money {
  margin-top: 18px;
}

.avico-estimator__summary-row,
.avico-estimator__money-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--avico-estimator-border);
}

.avico-estimator__summary-row span,
.avico-estimator__money-row span {
  min-width: 0;
  color: var(--avico-estimator-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.avico-estimator__summary-row strong,
.avico-estimator__money-row strong {
  flex: 0 0 auto;
  color: var(--avico-estimator-orange);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.avico-estimator__money-row strong {
  color: var(--avico-estimator-text);
}

.avico-estimator__money-row--profit {
  margin-top: 10px;
  padding: 16px 18px;
  border: 0;
  border-radius: 7px;
  background: #fff5f2;
}

.avico-estimator__money-row--profit span,
.avico-estimator__money-row--profit strong {
  color: var(--avico-estimator-orange);
  font-size: 18px;
  font-weight: 900;
}

.avico-estimator__note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fbfdff;
  color: #475467;
  font-size: 14px;
  line-height: 1.45;
}

.avico-estimator__note strong {
  color: #1d4ed8;
}

.avico-estimator__detail-toggle {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--avico-estimator-text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.avico-estimator__detail-toggle::after {
  content: "⌄";
  color: var(--avico-estimator-muted);
  font-size: 18px;
}

.avico-estimator__detail-toggle[aria-expanded="false"]::after {
  content: "›";
}

.avico-estimator__detail {
  margin-top: 22px;
  padding: 24px;
}

.avico-estimator__detail.is-collapsed {
  display: none;
}

.avico-estimator__table-wrap {
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--avico-estimator-border);
  border-radius: 8px;
}

.avico-estimator__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
}

.avico-estimator__table th,
.avico-estimator__table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--avico-estimator-border);
  color: var(--avico-estimator-text);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
}

.avico-estimator__table th {
  background: var(--avico-estimator-soft);
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.avico-estimator__table td:nth-child(2),
.avico-estimator__table td:nth-child(3),
.avico-estimator__table td:nth-child(4),
.avico-estimator__table th:nth-child(2),
.avico-estimator__table th:nth-child(3),
.avico-estimator__table th:nth-child(4) {
  text-align: right;
}

.avico-estimator__table tr:last-child td {
  border-bottom: 0;
}

.avico-estimator__table-total td {
  background: #fffafa;
  color: var(--avico-estimator-orange);
  font-weight: 900;
}

.avico-estimator__table-note {
  margin: 10px 0 0;
  color: var(--avico-estimator-muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .avico-estimator__top {
    grid-template-columns: 1fr;
  }

  .avico-estimator__card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .avico-estimator {
    max-width: 100%;
  }

  .avico-estimator__card,
  .avico-estimator__detail {
    padding: 18px;
    border-radius: 8px;
  }

  .avico-estimator__recommendation h2,
  .avico-estimator__total h2,
  .avico-estimator__detail h2 {
    font-size: 20px;
  }

  .avico-estimator__summary-row,
  .avico-estimator__money-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .avico-estimator__summary-row strong,
  .avico-estimator__money-row strong {
    text-align: left;
  }

  .avico-estimator__note {
    grid-template-columns: 1fr;
  }
}
