/* AprilGraph · Calculadora de Productos Importados v1.0.1 */
.agci-calculator,
.agci-calculator * {
  box-sizing: border-box;
}

.agci-calculator {
  --agci-bg: #ffffff;
  --agci-soft: #f8f8f6;
  --agci-soft-2: #f3f2ee;
  --agci-border: #e5e3dc;
  --agci-text: #171717;
  --agci-muted: #6f6f6a;
  --agci-accent: #ff6b3d;
  --agci-accent-soft: #fff1eb;
  --agci-success-bg: #edf8f0;
  --agci-success-text: #225c33;
  --agci-warning-bg: #fff6e8;
  --agci-warning-text: #7a4a00;
  --agci-radius: 22px;
  --agci-radius-sm: 14px;

  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  color: var(--agci-text);
  font-family: inherit;
  line-height: 1.5;
}

.agci-calculator p,
.agci-calculator h2,
.agci-calculator h3 {
  margin-top: 0;
}

.agci-header {
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}

.agci-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px !important;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--agci-accent-soft);
  color: var(--agci-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.agci-header h2 {
  margin-bottom: 12px;
  color: var(--agci-text);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.agci-header > p:last-child {
  max-width: 720px;
  margin: 0 auto;
  color: var(--agci-muted);
  font-size: 17px;
}

.agci-notice {
  margin: 0 0 24px;
  padding: 15px 18px;
  border: 1px solid var(--agci-border);
  border-radius: var(--agci-radius-sm);
  background: var(--agci-soft);
  color: #4f4f4b;
  font-size: 14px;
}

.agci-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 24px;
  align-items: start;
}

.agci-panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--agci-border);
  border-radius: var(--agci-radius);
  background: var(--agci-bg);
  box-shadow: 0 10px 32px rgba(16, 16, 16, .055);
}

.agci-panel h3 {
  margin: 0 0 20px;
  color: var(--agci-text);
  font-size: 20px;
  line-height: 1.25;
}

.agci-inputs > h3:not(:first-child) {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--agci-border);
}

.agci-inputs label {
  display: block;
  margin: 0 0 18px;
}

.agci-inputs label:last-child {
  margin-bottom: 0;
}

.agci-inputs label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--agci-text);
  font-size: 14px;
  font-weight: 700;
}

.agci-inputs label em {
  color: var(--agci-muted);
  font-weight: 500;
  font-style: normal;
}

.agci-inputs input,
.agci-inputs select {
  display: block;
  width: 100% !important;
  min-height: 50px;
  margin: 0 !important;
  padding: 11px 14px !important;
  border: 1px solid #d8d6cf !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--agci-text) !important;
  font: inherit !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.agci-inputs input:focus,
.agci-inputs select:focus {
  border-color: var(--agci-accent) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 61, .13) !important;
}

.agci-inputs small {
  display: block;
  margin-top: 6px;
  color: var(--agci-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.agci-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agci-two-cols label {
  margin-bottom: 18px;
}

.agci-results {
  position: sticky;
  top: 24px;
  background: #073B4C;
  color: #fff;
  border-color: #073B4C;
}

.agci-results h3 {
  color: #fff;
  margin-bottom: 18px;
}

.agci-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.agci-result span {
  color: rgba(255,255,255,.72);
  font-size: 13.5px;
}

.agci-result strong {
  flex: 0 0 auto;
  color: #fff;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.agci-highlight {
  margin: 10px -10px 0;
  padding: 16px 10px;
  border-bottom: 0;
  border-radius: 12px;
  background: rgba(255,107,61,.13);
}

.agci-highlight + .agci-highlight {
  margin-top: 8px;
}

.agci-highlight span {
  color: rgba(255,255,255,.83);
}

.agci-highlight strong {
  color: #ff9a79;
  font-size: 20px;
}

.agci-status,
.agci-evaluation {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
  font-size: 13px;
  line-height: 1.45;
}

.agci-status.is-success,
.agci-evaluation.is-success {
  background: rgba(102, 201, 124, .15);
  color: #b9efc5;
}

.agci-status.is-warning,
.agci-evaluation.is-warning {
  background: rgba(255, 184, 77, .14);
  color: #ffd79a;
}

.agci-formulas {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.agci-formulas p {
  margin: 0 0 9px;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  line-height: 1.5;
}

.agci-formulas p:last-child {
  margin-bottom: 0;
}

.agci-formulas strong {
  color: rgba(255,255,255,.82);
}

.agci-education {
  margin-top: 24px;
  padding: 26px 28px;
  border: 1px solid var(--agci-border);
  border-radius: var(--agci-radius);
  background: var(--agci-soft);
}

.agci-education h3 {
  margin-bottom: 10px;
  color: var(--agci-text);
  font-size: 20px;
}

.agci-education p {
  margin: 0;
  color: #4f4f4b;
  font-size: 14px;
}

.agci-disclaimer {
  margin-top: 14px !important;
  padding-top: 14px;
  border-top: 1px solid var(--agci-border);
  color: var(--agci-muted) !important;
  font-size: 12.5px !important;
}

/* Neutraliza estilos comunes de Elementor/tema que deforman inputs */
.elementor .agci-calculator input[type="number"],
.elementor .agci-calculator select {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

/* Oculta spinners de number para una presentación más limpia */
.agci-calculator input[type="number"]::-webkit-outer-spin-button,
.agci-calculator input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

@media (max-width: 900px) {
  .agci-grid {
    grid-template-columns: 1fr;
  }

  .agci-results {
    position: static;
  }
}

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

  .agci-header {
    margin-bottom: 18px;
  }

  .agci-header h2 {
    font-size: 30px;
  }

  .agci-header > p:last-child {
    font-size: 15px;
  }

  .agci-panel,
  .agci-education {
    padding: 20px;
    border-radius: 18px;
  }

  .agci-two-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .agci-result {
    align-items: flex-start;
  }

  .agci-result strong {
    max-width: 48%;
  }
}

/* === Layout correction v1.0.2 ===
   Allows the calculator to use the intended desktop width even when the
   shortcode is placed inside a narrow Elementor content container.
*/
.agci-calculator {
  width: min(1180px, calc(100vw - 40px)) !important;
  max-width: 1180px !important;
  margin-left: 50% !important;
  margin-right: 0 !important;
  transform: translateX(-50%);
}

/* The page already has its own hero/title, so avoid duplicated heading. */
.agci-calculator > .agci-header {
  display: none !important;
}

.agci-notice {
  max-width: none !important;
  margin-bottom: 18px !important;
}

.agci-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr) !important;
  gap: 26px !important;
}

.agci-panel {
  padding: 30px !important;
}

.agci-inputs input,
.agci-inputs select {
  min-height: 52px !important;
  font-size: 15px !important;
}

.agci-results {
  min-width: 0 !important;
  padding: 28px !important;
}

.agci-result strong {
  font-size: 16px !important;
}

.agci-highlight strong {
  font-size: 21px !important;
}

/* Keep the educational block aligned with the calculator width */
.agci-education {
  width: 100% !important;
}

@media (max-width: 980px) {
  .agci-calculator {
    width: min(100%, calc(100vw - 28px)) !important;
  }

  .agci-grid {
    grid-template-columns: 1fr !important;
  }

  .agci-results {
    position: static !important;
  }
}

@media (max-width: 640px) {
  .agci-calculator {
    width: calc(100vw - 22px) !important;
  }

  .agci-panel,
  .agci-education {
    padding: 18px !important;
  }
}
