.iq-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(12px, 4vw, 48px);
  overflow-y: auto;
  overflow-x: hidden;
}
.iq-modal[hidden] {
  display: none;
}
.iq-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 24, 19, 0.55);
  backdrop-filter: blur(2px);
  animation: iqFade 0.2s ease-out;
}
.iq-modal__dialog {
  position: relative;
  width: min(780px, 100%);
  background: #fff;
  border-radius: 19.6px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: iqPop 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
.iq-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.04);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  cursor: pointer;
}
.iq-modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
}
.iq-modal__header {
  padding: 32px 48px 12px;
  text-align: center;
}
.iq-modal__title {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  margin: 0 0 18px;
}
.iq-modal__body {
  padding: 8px 48px 28px;
}
.iq-modal__footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.iq-modal__feedback {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fde7e7;
  color: #b42318;
  font-size: 14px;
}

.iq-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 14px;
}

.iq-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: #f3f7f6;
  border: 1px solid #d7e3df;
  border-radius: 999px;
  color: #0b3127;
  transition: all 0.2s ease;
}
.iq-step__dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b3127;
  font-size: 14px;
}
.iq-step__label {
  font-weight: 500;
}
.iq-step__arrow {
  color: #0b3127;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
}
.iq-step.is-active {
  background: #12493C;
  border-color: #12493C;
  color: #fff;
}
.iq-step.is-active .iq-step__dot {
  background: none;
  color: #fff;
}
.iq-step.is-done {
  background: #fff;
  border-color: #12493C;
  color: #12493C;
}
.iq-step.is-done .iq-step__dot {
  background: #12493C;
  color: #fff;
}

.iq-step-panel {
  display: none;
}
.iq-step-panel.is-active {
  display: block;
  animation: iqFade 0.25s ease-out;
}

.iq-section {
  margin-bottom: 26px;
}
.iq-section__title {
  font-size: 24px;
  font-weight: 700;
  color: #0b3127;
}
.iq-section__subtitle {
  font-size: 16px;
  font-weight: 700;
  color: #0b3127;
  margin: 14px 0 10px;
}
.iq-section__hint {
  font-size: 14px;
  color: #0b3127;
  margin: -4px 0 10px;
}

.iq-sub-section + .iq-sub-section {
  margin-top: 18px;
}

.iq-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transition: box-shadow 0.2s ease;
  border-radius: 10px;
  margin-top: 30px;
}
.iq-chip-group.is-invalid {
  box-shadow: 0 0 0 2px rgba(226, 76, 76, 0.2);
  padding: 8px;
  margin: -8px;
  background: #fff3f3;
}

.iq-budget-grid.is-invalid {
  box-shadow: 0 0 0 2px rgba(226, 76, 76, 0.2);
  padding: 8px;
  margin: -8px;
  background: #fff3f3;
  border-radius: 10px;
}

.iq-chip {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 1px solid #d7e3df;
  background: #fff;
  color: #0b3127;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.iq-chip:hover {
  border-color: #12493C;
}
.iq-chip.is-selected {
  background: #eaf4ef;
  border-color: #12493C;
  color: #12493C;
}

.iq-budget-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 30px auto;
}

.iq-budget {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 1px solid #d7e3df;
  background: #fff;
  color: #0b3127;
  padding: 14px 10px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}
.iq-budget__amount {
  font-weight: 700;
  font-size: 15px;
}
.iq-budget__period {
  font-size: 14px;
}
.iq-budget:hover {
  border-color: #12493C;
}
.iq-budget.is-selected {
  background: #eaf4ef;
  border-color: #12493C;
  color: #12493C;
  box-shadow: inset 0 0 0 1px #12493C;
}

.iq-field-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.iq-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.iq-field__label {
  font-size: 16px;
  font-weight: 700;
  color: #0b3127;
}

.iq-input {
  border: 1px solid #d7e3df;
  background: #f3f7f6 !important;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0b3127;
  width: 100%;
  transition: all 0.15s ease;
}
.iq-input:focus {
  outline: none;
  border-color: #12493C;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 49, 39, 0.08);
}
.iq-input--textarea {
  resize: vertical;
  min-height: 100px;
}
.iq-input.is-invalid {
  border-color: #e24c4c;
  background: #fff3f3;
}

.iq-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #0b3127;
  cursor: pointer;
  margin-top: 6px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.iq-checkbox input[type=checkbox] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #12493C;
  background: #fff;
  position: relative;
  cursor: pointer;
  flex: none;
}
.iq-checkbox input[type=checkbox]:checked {
  background: #12493C;
}
.iq-checkbox input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.iq-btn {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.iq-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.iq-btn--primary {
  background: #f8c24e;
  color: #0b3127;
}
.iq-btn--primary:hover {
  background: #eab13a;
}
.iq-btn--ghost {
  background: #fff;
  color: #0b3127;
  border: 1px solid #d7e3df;
}
.iq-btn--ghost:hover {
  border-color: #12493C;
}

.iq-success {
  padding: 48px 48px 40px;
  text-align: center;
}
.iq-success__icon {
  color: #2ba36f;
  font-size: 54px;
  margin-bottom: 12px;
}
.iq-success__title {
  font-family: "Josefin Sans", sans-serif;
  font-size: 24px;
  margin: 0 0 10px;
  color: #0b3127;
}
.iq-success__text {
  color: #0b3127;
  margin: 0 0 24px;
}

body.iq-modal-open {
  overflow: hidden;
}

@keyframes iqFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes iqPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 768px) {
  .iq-modal {
    padding: 0 !important;
    display: block !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    background: #fff !important;
  }
  .iq-modal__backdrop {
    display: none !important;
  }
  .iq-modal__dialog {
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    display: block !important;
    overflow: visible !important;
    box-shadow: none !important;
    background: #fff !important;
    animation-name: iqSlideUp;
  }
  .iq-modal .iq-form {
    background: #fff;
  }
  .iq-modal__close {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    width: 42px !important;
    height: 42px !important;
    background: #12493C !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    font-size: 18px !important;
    z-index: 12000 !important;
  }
  .iq-modal__close:hover {
    background: rgb(12.956043956, 52.543956044, 43.1868131868) !important;
  }
  .iq-modal__header {
    padding: 20px 16px 12px !important;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid #d7e3df;
  }
  .iq-modal__body {
    padding: 16px !important;
    overflow: visible !important;
  }
  .iq-modal__title {
    margin-bottom: 12px !important;
    padding-right: 56px !important;
    font-size: 20px !important;
    text-align: left !important;
  }
  .iq-modal__footer {
    position: sticky;
    bottom: 0;
    margin: 20px -16px 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff;
    border-top: 1px solid #d7e3df;
    z-index: 4;
  }
  .iq-modal__footer .iq-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .iq-modal[hidden] {
    display: none !important;
  }
  .iq-section {
    margin-bottom: 20px;
  }
  .iq-section__title {
    font-size: 18px;
  }
  .iq-budget-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .iq-budget {
    padding: 12px 8px;
  }
  .iq-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .iq-success {
    padding: 40px 20px;
  }
  .iq-chip-group {
    gap: 6px;
  }
  .iq-chip {
    padding: 8px 14px;
    font-size: 13px;
  }
}
@keyframes iqSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
