/* Custom styles for UTILITY BODYWERKS Lead Form */

body {
    background-color: #f5f5f5;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 20px 0;
    min-height: 100vh;
}

.form-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 20px 0;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 20px;
}

.company-logo {
    max-height: 80px;
    max-width: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.form-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #000;
    letter-spacing: 2px;
    margin: 0;
}

.demo-notice {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

.lead-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
    min-height: 80px; /* Reserve space for error messages */
    position: relative; /* For absolute positioned error messages */
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
    font-size: 1rem;
}

.name-inputs {
    display: flex;
    gap: 15px;
    min-height: 50px; /* Ensure consistent height */
    position: relative; /* For error message positioning */
    margin-bottom: 20px; /* Space for error messages */
}

.name-inputs .form-control {
    flex: 1;
    min-height: 48px; /* Fixed height for inputs */
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
    min-height: 48px; /* Fixed height for all inputs */
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: #999;
    font-style: italic;
}

.consent-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.consent-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.privacy-link,
.terms-link {
    color: #d80201;
    text-decoration: none;
    font-weight: 500;
}

.privacy-link:hover,
.terms-link:hover {
    text-decoration: underline;
}

.submit-section {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background-color: #d80201;
    border: none;
    border-radius: 5px;
    padding: 10px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: background-color 0.3s ease;
    min-width: 150px;
}

.submit-btn:hover {
    background-color: #d80201;
    color: white;
}

.submit-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.alert {
    border-radius: 5px;
    padding: 15px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .company-logo {
        max-height: 60px;
        max-width: 150px;
    }
    
    .form-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .name-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .consent-text {
        font-size: 0.8rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px 0;
    }
    
    .form-container {
        padding: 15px;
        margin: 5px;
    }
    
    .company-logo {
        max-height: 50px;
        max-width: 120px;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Form validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    position: absolute;
    bottom: -20px;
    left: 0;
    z-index: 1;
}

/* Specific styling for name inputs error messages */
.name-inputs .invalid-feedback {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    text-align: left;
}

.name-field-error {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
    position: absolute;
    bottom: -20px;
    left: 0;
    z-index: 1;
}
