.modal-step-form-wrapper {
    position: relative;
}

.modal-step-form-open {
    padding: 0.75rem 1.25rem;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-step-form-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999;
    padding: 1rem;
}

.modal-step-form-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.modal-step-form {
    background: #fff;
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-step-form-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #111827;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

.modal-step-form-close:hover,
.modal-step-form-close:focus {
    background: transparent;
    color: #111827;
    outline: none;
}

.modal-step-form-progress {
    color: #4b5563;
    margin: 0 0 1rem;
}

.modal-step-form-step label {
    display: block;
    margin-bottom: 0.75rem;
    color: #111827;
    font-weight: 600;
}

.modal-step-form-label-text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.modal-step-form-required {
    color: #dc2626;
    font-weight: 700;
}

.modal-step-form-step small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-weight: 400;
    font-size: 0.875rem;
}

.modal-step-form-step input,
.modal-step-form-step textarea {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-step-form-step input[type="range"] {
    padding: 0;
    margin-top: 0.65rem;
}

.modal-step-form-range-output {
    margin-top: 0.35rem;
    color: #0f172a;
    font-weight: 700;
}

.modal-step-form-consents {
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.modal-step-form-consents-title {
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem;
}

.modal-step-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 500;
    color: #111827;
    margin: 0.5rem 0;
}

.modal-step-form-consent input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin-top: 0.2rem;
}

.modal-step-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-step-form-actions button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
}

.modal-step-form-prev {
    background: #e5e7eb;
    color: #111827;
}

.modal-step-form-next,
.modal-step-form-submit {
    background: #10b981;
    color: #fff;
}

.modal-step-form-status {
    margin-top: 0.75rem;
    min-height: 1.25rem;
    color: #111827;
}

.modal-step-form-status.is-error {
    color: #b91c1c;
}

.modal-step-form-status.is-success {
    color: #047857;
}

.modal-step-form-loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #1d4ed8;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    border-radius: 8px;
    z-index: 10;
}

.modal-step-form-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #bfdbfe;
    border-top-color: #1d4ed8;
    animation: modal-step-form-spin 0.75s linear infinite;
}

.modal-step-form-overlay.is-loading .modal-step-form-loader {
    display: flex;
}

.modal-step-form-overlay.is-loading .modal-step-form {
    pointer-events: none;
}

  .modal-step-form-success {
      margin-top: 1rem;
      padding: 1.5rem 1.5rem 1rem;
      border: 1px solid #d1fae5;
      background: #ecfdf3;
      border-radius: 8px;
      text-align: center;
      position: relative;
  }

  .modal-step-form-success-text {
      margin: 0;
      color: #065f46;
      font-weight: 700;
  }

.modal-step-form .modal-step-form-close {
    background-color: transparent;
}

@keyframes modal-step-form-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
