/* Seção: menos espaço entre título, abas e card */
section[data-manifest-key="stone-shared/sections/SmartCalculator.tsx"] > section {
  gap: 1rem;
}

@media (min-width: 1024px) {
  section[data-manifest-key="stone-shared/sections/SmartCalculator.tsx"] > section {
    gap: 1.5rem;
  }
}

#ton-fee-calculator.ton-calc {
  width: 100%;
  max-width: 728px;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  #ton-fee-calculator.ton-calc {
    max-width: 912px;
    gap: 1rem;
  }
}

#ton-fee-calculator .ton-calc-tabs {
  scrollbar-width: none;
}

#ton-fee-calculator .ton-calc-tab {
  font-size: 1rem;
  font-weight: 600;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-tab {
    font-size: 1.0625rem;
  }
}

#ton-fee-calculator .ton-calc-tab.is-active {
  background-color: #fff;
  border-color: #e6ecf2;
  color: #00d700;
}

#ton-fee-calculator [data-calc-title] {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

@media (min-width: 1024px) {
  #ton-fee-calculator [data-calc-title] {
    font-size: 1.75rem;
  }
}

/* Casca verde (como no site oficial) */
#ton-fee-calculator .ton-calc-card {
  width: 100%;
  border: 3px solid #00d700;
  border-radius: 40px;
  background-color: #00d700;
  overflow: visible;
  box-shadow: none;
}

#ton-fee-calculator .ton-calc-card__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 380px;
  border-radius: 37px;
  overflow: hidden;
}

@media (min-width: 768px) {
  #ton-fee-calculator .ton-calc-card__inner {
    flex-direction: row;
    min-height: 420px;
  }
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-card__inner {
    min-height: 440px;
  }
}

/* Ilustração colada ao painel branco — sem gap */
#ton-fee-calculator .ton-calc-card__visual {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: #00d700;
  margin: 0;
  padding: 1rem 0 0;
  min-height: 180px;
  width: 100%;
}

@media (min-width: 768px) {
  #ton-fee-calculator .ton-calc-card__visual {
    width: auto;
    flex: 0 0 auto;
    max-width: 42%;
    min-height: 0;
    padding: 1.25rem 0 0;
  }
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-card__visual {
    padding-top: 1.5rem;
  }
}

#ton-fee-calculator .ton-calc-card__visual picture {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

#ton-fee-calculator .ton-calc-card__visual img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: bottom center;
}

@media (min-width: 768px) {
  #ton-fee-calculator .ton-calc-card__visual img {
    width: auto;
    max-width: min(42vw, 300px);
    height: 100%;
    max-height: 420px;
    min-height: 360px;
    object-fit: contain;
    object-position: bottom left;
    margin: 0;
    display: block;
  }
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-card__visual img {
    max-width: 320px;
    max-height: 440px;
    min-height: 400px;
  }
}

/* Painel branco encosta na ilustração (sem margem entre colunas) */
#ton-fee-calculator .ton-calc-card__panel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 1.25rem;
  background-color: #fff;
  border-radius: 28px 28px 0 0;
}

@media (min-width: 768px) {
  #ton-fee-calculator .ton-calc-card__panel {
    padding: 1.5rem 1.75rem 1.25rem 1.5rem;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-card__panel {
    padding: 1.75rem 2rem 1.5rem 1.75rem;
  }
}

#ton-fee-calculator .ton-calc-card__body {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  flex: 1 1 auto;
}

@media (min-width: 768px) {
  #ton-fee-calculator .ton-calc-card__body {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 1.75rem;
  }

  #ton-fee-calculator .ton-calc-results {
    border-left: 1px solid #e6ecf2;
    padding-left: 1.75rem;
  }
}

#ton-fee-calculator .ton-calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

#ton-fee-calculator .ton-calc-select,
#ton-fee-calculator #ton-calc-amount {
  width: 100%;
  background-color: #eef1f0;
  border-color: transparent;
}

/* —— Tipografia (formulário) —— */
#ton-fee-calculator .ton-calc-label {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-label {
    font-size: 1rem;
  }
}

#ton-fee-calculator .ton-calc-select {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-select {
    font-size: 1.125rem;
  }
}

#ton-fee-calculator #ton-calc-amount {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

#ton-fee-calculator .ton-calc-results {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  overflow: visible;
}

#ton-fee-calculator .ton-calc-result-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid #e6ecf2;
}

#ton-fee-calculator .ton-calc-result-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

#ton-fee-calculator .ton-calc-result-row__left,
#ton-fee-calculator .ton-calc-result-row__right {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

#ton-fee-calculator .ton-calc-result-row__left {
  flex: 1 1 auto;
  align-items: flex-start;
}

#ton-fee-calculator .ton-calc-result-row__right {
  flex: 0 0 auto;
  align-items: flex-end;
  text-align: right;
}

/* —— Tipografia (resultados) —— */
#ton-fee-calculator .ton-calc-result-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

#ton-fee-calculator .ton-calc-result-rate,
#ton-fee-calculator .ton-calc-result-row [data-rate-pix],
#ton-fee-calculator .ton-calc-result-row [data-rate-debit],
#ton-fee-calculator .ton-calc-result-row [data-rate-credit],
#ton-fee-calculator .ton-calc-result-row [data-rate-installment] {
  color: #00d700;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-result-label {
    font-size: 1.0625rem;
  }

  #ton-fee-calculator .ton-calc-result-rate,
  #ton-fee-calculator .ton-calc-result-row [data-rate-pix],
  #ton-fee-calculator .ton-calc-result-row [data-rate-debit],
  #ton-fee-calculator .ton-calc-result-row [data-rate-credit],
  #ton-fee-calculator .ton-calc-result-row [data-rate-installment] {
    font-size: 1.5rem;
  }
}

#ton-fee-calculator .ton-calc-result-net-label {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.3;
}

#ton-fee-calculator .ton-calc-result-amount {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-result-amount {
    font-size: 1.25rem;
  }
}

/* Seletor de parcelas (Crédito Nx) */
#ton-fee-calculator .ton-calc-installment-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#ton-fee-calculator .ton-calc-installments-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#ton-fee-calculator .ton-calc-installment-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
}

#ton-fee-calculator .ton-calc-installment-trigger:hover,
#ton-fee-calculator .ton-calc-installment-trigger:focus-visible {
  outline: none;
  color: #00d700;
}

#ton-fee-calculator .ton-calc-installment-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

#ton-fee-calculator .ton-calc-installment-trigger svg {
  transition: transform 0.2s ease;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-installment-trigger {
    font-size: 1.0625rem;
  }
}

#ton-fee-calculator .ton-calc-installment-menu {
  position: absolute;
  top: auto;
  bottom: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 10.5rem;
  max-height: 16rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

#ton-fee-calculator .ton-calc-installment-menu[hidden] {
  display: none;
}

#ton-fee-calculator .ton-calc-installment-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: #1a1a1a;
  white-space: nowrap;
}

#ton-fee-calculator .ton-calc-installment-option:hover,
#ton-fee-calculator .ton-calc-installment-option:focus-visible {
  background: #eef1f0;
  outline: none;
}

#ton-fee-calculator .ton-calc-installment-option.is-selected {
  background: #e8f9c5;
  font-weight: 600;
  color: #05751a;
}

#ton-fee-calculator .ton-calc-result-row[data-method="installment"] {
  position: relative;
  z-index: 2;
}

#ton-fee-calculator .ton-calc-results {
  position: relative;
}

#ton-fee-calculator .ton-calc-conditions {
  margin: 0.5rem 0 0;
  padding: 0;
  text-align: right;
  width: 100%;
  flex-shrink: 0;
}

#ton-fee-calculator .ton-calc-conditions-link {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

@media (min-width: 768px) {
  #ton-fee-calculator .ton-calc-conditions-link {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-conditions-link {
    font-size: 0.9375rem;
  }
}

#ton-fee-calculator .ton-calc-cta {
  width: 100%;
  max-width: 360px;
  font-size: 1rem;
  font-weight: 600;
}

@media (min-width: 1024px) {
  #ton-fee-calculator .ton-calc-cta {
    font-size: 1.0625rem;
  }
}
