/* Multi-Step Form Styles */
:root {
    --primary-blue: #3777bc;
    --primary-orange: #f58220;
    --light-gray: #f8f9fa;
    --border-gray: #e9ecef;
}

/* Hide HubSpot form until it's transformed */
.hubspot-form-container .hs-form:not(.multistep-form-wrapper .hs-form) {
    visibility: hidden;
    position: absolute;
}

/* Show form once wrapped in multistep */
.multistep-form-wrapper .hs-form {
    visibility: visible;
    position: relative;
}

.multistep-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Progress Bar Container */
.form-progress {
    background: var(--light-gray);
    padding: 30px;
    border-bottom: 1px solid var(--border-gray);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 20px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active .step-circle {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(55, 119, 188, 0.4);
}

.progress-step.completed .step-circle {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
}

.progress-step.completed .step-circle::after {
    content: '✓';
    font-size: 18px;
}

.step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    display: block;
}

.progress-step.active .step-label {
    color: var(--primary-blue);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--primary-orange);
}

/* Progress Bar */
.progress-bar-container {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-blue);
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* Form Content */
.form-content {
    padding: 40px;
    position: relative;
    background-image: url('../images/rm-gray-logo.png');
    background-repeat: no-repeat;
    background-position: 120% -10%;
    background-size: 45%;
    background-attachment: scroll;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
	padding: 0;
}

.step-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 30px;
}

/* Step Fields Container */
.step-fields {
    display: block;
}

.step-fields .hs-form-field {
    display: block !important;
    margin-bottom: 20px;
}

.step-fields .hs-form-field .input {
    display: block !important;
}

/* Form Fields Styling */
.form-step .hs-form-field {
    margin-bottom: 24px;
    display: block !important;
}

.form-step label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-step .hs-form-required {
    color: #AC0C0C;
    margin-left: 4px;
}

.form-step input[type="text"],
.form-step input[type="email"],
.form-step input[type="tel"],
.form-step input[type="number"],
.form-step select,
.form-step textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
    background: white;
}

.form-step input[type="text"]:focus,
.form-step input[type="email"]:focus,
.form-step input[type="tel"]:focus,
.form-step input[type="number"]:focus,
.form-step select:focus,
.form-step textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(55, 119, 188, 0.1);
}

.form-step textarea {
    min-height: 120px;
    resize: vertical;
}

/* Checkbox Styling */
.form-step .inputs-list {
    list-style: none;
    padding: 0;
    column-count: 2;
}

.form-step .hs-form-checkbox {
    margin-bottom: 12px;
}

.form-step .hs-form-checkbox-display {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.form-step .hs-form-checkbox-display:hover {
    background: #f9fafb;
}

.form-step .hs-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

/* Two Column Layout */
.step-fields .form-columns-2,
.form-columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.step-fields .form-columns-2 .hs-form-field {
    display: block !important;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.btn-prev:hover:not(:disabled) {
    background: #e5e7eb;
}

.btn-next,
.btn-submit {
    background: var(--primary-orange);
    color: black;
    margin-left: auto;
}

.btn-next:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 130, 32, 0.3);
    background: #e67419;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide original submit button */
.hs-submit {
    display: none !important;
}

/* Hidden fields should stay hidden */
.form-step .hs-form-field[style*="display: none"],
.form-step .hs-form-field[style*="display:none"] {
    display: none !important;
}

/* reCAPTCHA positioning */
.hs-recaptcha {
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 640px) {
    .form-content {
        padding: 24px;
		background-position: 125% -2%;
    }
    
    .form-columns-2 {
        grid-template-columns: 1fr;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-next,
    .btn-submit {
        margin-left: 0;
    }
}