* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roobert ENEL', Arial, sans-serif;
  background: #f5f5f5;
  color: #131416;
}

/* MODAL */
.modal {
  background: #fff;
  width: 100%;
  max-width: 1200px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

/* PROGRESS BAR */
.progress-bar {
  height: 6px;
  background: #EFF2F7;
}

.progress-bar-fill {
  height: 100%;
  background: #0047CC;
  transition: width 0.4s ease;
}

/* BODY */
.modal-body {
  overflow-y: auto;
  padding: 32px 120px 0px;
}

/* TITLE */
.modal-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  text-align: center;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}

.modal-subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 27px;
  text-align: center;
  color: #131416;
  margin-bottom: 40px;
}

/* SECTIONS */
.section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.section-title .icon-info-outline {
  cursor: pointer;
  flex-shrink: 0;
}

/* TOOLTIP */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
}

.tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-12px);
  z-index: 100;
  filter: drop-shadow(0px 2px 8px rgba(102, 119, 144, 0.2));
}

.tooltip.active {
  display: flex;
  align-items: flex-start;
}

.tooltip-arrow {
  width: 5px;
  height: 18px;
  position: relative;
  margin-top: 8px;
}

.tooltip-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
}

.tooltip-box {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tooltip-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 21px;
  color: #131416;
}

.tooltip-close {
  background: none;
  border: none;
  font-size: 14px;
  color: #272C34;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.tooltip-text {
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: #272C34;
}

.fields-row {
  display: flex;
  gap: 24px;
}

.field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* INPUT */
.input-container {
  position: relative;
  border: 1px solid #667790;
  border-radius: 4px;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 12px;
  background: #fff;
  transition: border-color 0.2s;
}

.input-container:focus-within {
  border-color: #0047CC;
  box-shadow: 0 0 0 1px #0047CC;
}

.input-label-float {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #667790;
  pointer-events: none;
  transition: all 0.15s ease;
  background: transparent;
}

/* Label arriba cuando tiene valor O tiene focus */
.input-field:not(:placeholder-shown) ~ .input-label-float,
.input-container:focus-within .input-label-float {
  top: 10px;
  transform: translateY(0);
  font-size: 11px;
  line-height: 11px;
}

.input-container:focus-within .input-label-float {
  color: #0047CC;
}

.input-field {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: #131416;
  background: transparent;
  padding: 20px 0 4px;
}

.input-field::-webkit-outer-spin-button,
.input-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.input-field[type=number] {
  -moz-appearance: textfield;
}

.input-unit {
  font-size: 14px;
  font-weight: 700;
  color: #667790;
  white-space: nowrap;
  margin-left: 8px;
}

/* HELPER LINK */
.helper-link {
  font-size: 12px;
  color: #D3135A;
  text-decoration: underline;
  cursor: pointer;
}

/* FIELD ERROR */
.field-error {
  font-size: 12px;
  color: #ED0529;
  margin-top: 4px;
}

/* TOGGLE PILL */
.toggle-group {
  margin-bottom: 16px;
}

.toggle-group.centered {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.toggle {
  display: inline-flex;
  position: relative;
  background: #EFF2F7;
  border-radius: 8px;
  padding: 4px;
}

.toggle-btn {
  position: relative;
  z-index: 1;
  padding: 8px 24px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  color: #667790;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s;
  min-width: 100px;
  text-align: center;
}

.toggle-btn.active {
  color: #fff;
}

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: #D3135A;
  border-radius: 6px;
  transition: all 0.25s ease;
  pointer-events: none;
}

/* READONLY INPUTS */
.input-container.readonly {
  background: #F7F8FB;
}

.input-container.readonly .input-field {
  color: #667790;
  cursor: default;
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px dashed #C2CDDD;
  margin: 24px 0;
}

/* INFO BOX */
.info-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #F4F8FF;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.info-box svg {
  flex-shrink: 0;
}

.info-box p {
  font-size: 14px;
  line-height: 21px;
  color: #131416;
}

/* DISCLAIMER */
.disclaimer {
  margin-bottom: 24px;
}

.disclaimer-text {
  font-size: 12px;
  line-height: 18px;
  color: #131416;
}

/* STICKY FOOTER */
.modal-footer {
  border-top: 1px solid #EFF2F7;
  padding: 24px 120px;
  display: flex;
  justify-content: flex-end;
  background: #fff;
  position: sticky;
  bottom: 0;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  background: #D3135A;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #b8104d;
}

.btn-primary:disabled {
  background: #C2CDDD;
  cursor: not-allowed;
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

/* ==================== */
/* RESULTADO            */
/* ==================== */
.view { display: none; }
.view.active { display: flex; flex-direction: column; }

.result-hero {
  text-align: center;
  padding: 0px;
}

.result-hero .label {
  font-size: 18px;
  color: #667790;
  margin-bottom: 8px;
}

.result-hero .amount {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(90deg, #0047CC 0%, #3B80FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.result-hero .btn-primary {
  margin: 0 auto 32px;
}

.result-hero .cards-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 0.4px;
  color: #131416;
  text-align: center;
}

.result-hero .amount-sub {
  font-size: 18px;
  color: #131416;
  margin-top: 8px;
}

.result-cards {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.result-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  filter: drop-shadow(0px 0px 16px rgba(102, 119, 144, 0.4));
  background: #fff;
}

.card-image {
  padding: 16px 16px 0;
  background: #fff;
}

.card-image img {
  width: 100%;
  height: 184px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 16px;
  flex: 1;
}

.result-card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 0.4px;
  color: #1C1E20;
  margin: 0;
}

.card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  font-size: 14px;
  line-height: 21px;
  color: #131416;
}

.card-btn {
  width: 100%;
  height: 48px;
  background: #D3135A;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.card-btn:hover {
  background: #b8104d;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #EFF2F7;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row.highlight {
  background: #EFF2F7;
  margin: 8px -12px -12px;
  padding: 10px 12px;
  border-radius: 0 0 8px 8px;
  border-bottom: none;
  font-weight: 700;
}

.result-card .result-row .val {
  text-align: right;
}

.result-row .val {
  font-weight: 700;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  background: #fff;
  color: #D3135A;
  border: 0px solid #D3135A;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  margin-right: auto;
}

.btn-secondary:hover {
  background: #fdf0f4;
}

.modal-footer .footer-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: flex-end;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .modal {
    max-width: 100%;
    min-height: auto;
    height: auto;
    border-radius: 0;
  }

  .modal-body {
    padding: 16px 24px 24px;
  }

  .modal-footer {
    padding: 16px 24px;
    position: sticky;
    bottom: 0;
  }
  .tooltip-box {
    width: 200px;
  }
  .modal-title {
    margin-top: 20px;
    font-size: 28px;
    line-height: 36px;
  }

  .modal-subtitle {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .fields-row {
    flex-direction: column;
    gap: 16px;
  }

  .result-cards {
    flex-direction: column;
  }

  .tooltip {
    left: 50%;
    right: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%);
  }

  .tooltip-arrow {
    display: none;
  }
}
