/* ==========================================================================
   SEÇÃO: CALCULADORA DE GLOSAS - CSS
   Identidade Visual UHS Easy Guide (Teal, Mint, Dark Card & Clean UI)
   ========================================================================== */

.section-calculadora {
  position: relative;
  padding: 100px 0 120px;
  background-color: #f7fdfc;
  overflow: hidden;
}

.calculadora-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.calculadora-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.calculadora-eyebrow {
  margin-bottom: 20px;
  display: inline-block;
}

.calculadora-title {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-primary, #101828);
  margin-bottom: 16px;
}

.calculadora-subtitle {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text-muted, #475467);
  max-width: 640px;
}

/* Card Principal */
.calculadora-card {
  background: #ffffff;
  border-radius: 36px;
  box-shadow: 0 24px 64px -16px rgba(18, 131, 116, 0.12), 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(18, 131, 116, 0.15);
  padding: 56px 48px;
}

/* Grid de Perguntas */
.calc-questions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.calc-question-card {
  background: #f8fafb;
  border: 1.5px solid #e7ecee;
  border-radius: 24px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.calc-question-card:hover {
  border-color: rgba(18, 131, 116, 0.35);
  box-shadow: 0 10px 25px -5px rgba(18, 131, 116, 0.08);
}

.calc-q-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.calc-q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-teal, #128374);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.calc-q-title {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--color-text-primary, #101828);
  line-height: 1.35;
}

/* Pills de Opções */
.calc-options-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.calc-options-pills.pills-vertical {
  grid-template-columns: 1fr;
}

.calc-pill {
  appearance: none;
  background-color: #ffffff;
  border: 1.5px solid #d0d7d9;
  border-radius: 100px;
  padding: 12px 14px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-secondary, #344054);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  outline: none;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calc-pill:hover {
  border-color: var(--color-teal, #128374);
  color: var(--color-teal, #128374);
  background-color: #f0fdfa;
}

.calc-pill.is-selected {
  background: linear-gradient(135deg, #128374 0%, #0d6559 100%);
  border-color: #128374;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(18, 131, 116, 0.3);
}

.calc-pill.pill-time {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13.5px;
  justify-content: flex-start;
  text-align: left;
}

.calc-pill.pill-time.is-selected {
  background: linear-gradient(135deg, #128374 0%, #0d6559 100%);
  color: #ffffff;
}

/* Input para 200+ */
.calc-custom-qty-wrapper {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #d5dedc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-sublabel {
  font-size: 12.5px;
  color: var(--color-text-muted, #475467);
  font-weight: 500;
}

.calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-input-field {
  width: 100%;
  height: 44px;
  background: #ffffff;
  border: 1.5px solid #d0d7d9;
  border-radius: 12px;
  padding: 0 85px 0 14px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: #101828;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-input-field:focus {
  border-color: var(--color-teal, #128374);
  box-shadow: 0 0 0 3px rgba(18, 131, 116, 0.15);
}

.calc-input-suffix {
  position: absolute;
  right: 14px;
  font-size: 12.5px;
  color: var(--color-text-light, #667085);
  font-weight: 500;
  pointer-events: none;
}

/* Input de Moeda */
.calc-currency-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.calc-currency-prefix {
  position: absolute;
  left: 16px;
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-teal, #128374);
  pointer-events: none;
}

.calc-currency-field {
  width: 100%;
  height: 52px;
  background: #ffffff;
  border: 1.5px solid #d0d7d9;
  border-radius: 14px;
  padding: 0 16px 0 48px;
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary, #101828);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-currency-field:focus {
  border-color: var(--color-teal, #128374);
  box-shadow: 0 0 0 3.5px rgba(18, 131, 116, 0.15);
}

.calc-q-hint {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--color-text-light, #667085);
  margin-top: 12px;
}

/* ==========================================================================
   RESULTADOS DA CALCULADORA
   ========================================================================== */
.calc-results-section {
  background: linear-gradient(180deg, #f0fbf8 0%, #e8f7f4 100%);
  border: 1px solid rgba(18, 131, 116, 0.2);
  border-radius: 28px;
  padding: 40px;
}

.calc-results-header {
  text-align: center;
  margin-bottom: 32px;
}

.calc-results-tag {
  display: inline-block;
  padding: 4px 14px;
  background-color: rgba(18, 131, 116, 0.15);
  color: var(--color-teal, #128374);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.calc-results-heading {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text-primary, #101828);
}

/* Grid de Indicadores */
.calc-indicators-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.calc-metric-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid #e1e9e8;
  display: flex;
  flex-direction: column;
}

.calc-metric-card.metric-primary {
  border: 2px solid var(--color-teal, #128374);
  background: #ffffff;
  position: relative;
  box-shadow: 0 12px 30px rgba(18, 131, 116, 0.12);
}

.metric-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: var(--color-teal, #128374);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.metric-badge-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light, #667085);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.metric-value-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.metric-value {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--color-text-primary, #101828);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.calc-metric-card.metric-primary .metric-value {
  color: var(--color-teal, #128374);
  font-size: 38px;
}

.metric-suffix {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-secondary, #344054);
}

.metric-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted, #475467);
  margin-top: auto;
}

/* ==========================================================================
   CARD OPCIONAL DE PERDA ESTIMADA
   ========================================================================== */
.calc-optional-loss-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #d5e5e2;
  padding: 30px;
  margin-bottom: 36px;
}

.loss-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.loss-card-title {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary, #101828);
  margin-bottom: 4px;
}

.loss-card-caption {
  font-size: 13px;
  color: var(--color-text-muted, #475467);
}

.loss-pct-badge {
  display: inline-block;
  padding: 6px 16px;
  background: #eef9f7;
  border: 1.5px solid var(--color-teal, #128374);
  border-radius: 999px;
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-teal, #128374);
  white-space: nowrap;
}

.loss-slider-control-wrap {
  margin-bottom: 24px;
}

.calc-range-slider {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #d3ebe7;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.calc-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-teal, #128374);
  box-shadow: 0 2px 8px rgba(18, 131, 116, 0.4);
  border: 3px solid #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.calc-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-teal, #128374);
  box-shadow: 0 2px 8px rgba(18, 131, 116, 0.4);
  border: 3px solid #ffffff;
  cursor: pointer;
}

.loss-slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-light, #667085);
  margin-top: 8px;
}

/* Banner de Resultado da Perda */
.loss-result-banner {
  background: #fcf6ec;
  border: 1px solid #fedf89;
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loss-result-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #b54708;
}

.loss-result-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.loss-result-value {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 32px;
  font-weight: 800;
  color: #b54708;
  line-height: 1;
}

.loss-result-period {
  font-size: 14px;
  font-weight: 600;
  color: #b54708;
}

.loss-result-disclaimer {
  font-size: 12px;
  color: #7a2e0e;
  line-height: 1.4;
  margin-top: 4px;
}

/* ==========================================================================
   CONVERSÃO APÓS A CALCULADORA
   ========================================================================== */
.calc-conversion-box {
  background: #ffffff;
  border-radius: 22px;
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
}

.conversion-text-wrap {
  flex: 1;
}

.conversion-title {
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary, #101828);
  line-height: 1.3;
  margin-bottom: 8px;
}

.conversion-subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-muted, #475467);
  max-width: 580px;
}

.conversion-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-calc-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #128374 0%, #0d6559 100%);
  color: #ffffff;
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 16px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(18, 131, 116, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-calc-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 131, 116, 0.45);
}

.conversion-note {
  font-size: 12px;
  color: var(--color-text-light, #667085);
  text-align: center;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 1024px) {
  .calc-questions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .calc-indicators-grid {
    grid-template-columns: 1fr;
  }
  .calc-conversion-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .conversion-subtitle {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .section-calculadora {
    padding: 70px 0 90px;
  }
  .calculadora-card {
    padding: 32px 20px;
    border-radius: 24px;
  }
  .calculadora-title {
    font-size: 30px;
  }
  .calculadora-subtitle {
    font-size: 16px;
  }
  .calc-results-section {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .calc-optional-loss-card {
    padding: 20px 16px;
  }
  .loss-card-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .calc-conversion-box {
    padding: 24px 18px;
  }
  .btn-calc-cta {
    width: 100%;
    justify-content: center;
    font-size: 13.5px;
    padding: 14px 20px;
    text-align: center;
  }
}
