/**
 * Advisors ReInvest Form Styles
 */

/* Form Wrapper */
.ari-lead-form-wrapper {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Header */
.ari-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ari-form-header h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.ari-form-header p {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}

/* Form Groups */
.ari-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.ari-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.ari-form-group .required {
    color: #e74c3c;
}

.ari-form-group input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: #fff;
}

.ari-form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Error States */
.ari-form-group.error input {
    border-color: #e74c3c;
}

.ari-form-group.error input:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    position: absolute;
}

/* Submit Button */
.ari-form-submit {
    margin-top: 2rem;
}

.ari-submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    background: #27ae60;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ari-submit-button:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.ari-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.ari-submit-button .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.ari-submit-button.loading .spinner {
    display: block;
}

.ari-submit-button.loading .button-text {
    margin-right: 2rem;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Messages */
.ari-form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.ari-form-message:not(:empty) {
    display: block;
}

.ari-form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ari-form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ari-form-message h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.ari-form-message p {
    margin: 0.25rem 0;
}

/* Footer */
.ari-form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.privacy-note {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .ari-lead-form-wrapper {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .ari-form-header h3 {
        font-size: 1.5rem;
    }
}

/* Apply Now Button Tracking */
.ari-apply-now,
[data-ari-track="apply"] {
    position: relative;
}

.ari-apply-now:after,
[data-ari-track="apply"]:after {
    content: '';
    position: absolute;
    inset: -5px;
    pointer-events: none;
}