/* Main form container */
.lead-capture-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px; /* Reduced padding for mobile */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.submission-loader {
    margin-top: 15px;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    color: #666;
}

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

/* General button styling */
.lead-capture-form button {
    padding: 12px 25px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Back Button styling - smaller and light */
.lead-capture-form .btn.btn-secondary {
    background-color: #f7f7f7 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    width: 120px !important; /* Smaller back button */
    padding: 10px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
}

.lead-capture-form .btn.btn-secondary:hover {
    background-color: #ddd !important;
    color: #555 !important;
    border-color: #bbb !important;
}

/* Next Button styling - bold and larger */
.lead-capture-form .btn.btn-primary {
    background-color: #000 !important;
    color: white !important;
    border: none !important;
    min-width: 80% !important; /* Larger next button */
    padding: 12px !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1) !important; /* Subtle shadow */
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
}

.lead-capture-form .btn.btn-primary:hover {
    background-color: #222 !important;
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.2) !important;
}

.lead-capture-form .form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.lead-capture-form .form-navigation .btn {
    padding: 10px 20px;
}


/* Mobile adjustments for Next Button */
@media (max-width: 768px) {
    .lead-capture-form .btn.btn-primary {
        padding: 15px !important; /* Slightly reduced padding for mobile */
        font-size: 16px !important; /* Slightly smaller font size */
        min-width: 60% !important; /* Slightly smaller button width */
    }

    /* Smaller back button for mobile, but keep the difference */
    .lead-capture-form .btn.btn-secondary {
        padding: 8px !important;
        font-size: 12px !important;
        min-width: 60% !important;
    }

    .lead-capture-form .grid {
        grid-template-columns: 1fr;
    }

    .lead-capture-form .form-navigation {
        flex-direction: column;
        align-items: center;
    }

    .lead-capture-form .btn.btn-secondary, 
    .lead-capture-form .btn.btn-primary {
        width: 100%; /* Full-width buttons on mobile */
        margin-bottom: 10px;
    }    

    .alert-popup-content {
        padding: 15px;  /* Reduce padding on smaller screens */
        max-width: 90%;  /* Ensure the pop-up doesn't take the full width */
        font-size: 14px;
        word-wrap: break-word;
    }

    #alert-message {
        font-size: 16px;  /* Slightly smaller font for better readability on mobile */
    }

    .popup-close-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* Ensuring buttons align correctly in navigation */
.lead-capture-form .form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.lead-capture-form .form-navigation .btn.btn-primary {
    flex: 1;
}

.lead-capture-form .form-navigation .btn.btn-primary,
.lead-capture-form .form-navigation .btn.btn-secondary {
    margin: 5px;
}

/* Add left and right icons */
.lead-capture-form .btn.btn-secondary::before {
    content: "\2190"; /* Left arrow */
    font-size: 18px;
    margin-right: 8px;
}

.lead-capture-form .btn.btn-primary::after {
    content: "\2192"; /* Right arrow */
    font-size: 18px;
    margin-left: 8px;
}

/* Inputs styling */
.lead-capture-form input[type="email"],
.lead-capture-form input[type="text"],
.lead-capture-form input[type="tel"],
.lead-capture-form select,
.lead-capture-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    padding: 12px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    color: #333;
}

.lead-capture-form .form-group {
    margin-bottom: 20px;
}

.lead-capture-form label {
    display: block;
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

/* Adjusted grid for radio options */
.lead-capture-form .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.lead-capture-form .radio-option {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    width: 100%;
}

.lead-capture-form .radio-option:hover {
    background-color: #f1f1f1;
    border-color: #333;
}

/* Hide the default radio button circle */
.lead-capture-form .form-check-input {
    display: none;
}

.lead-capture-form .form-check-label {
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    margin-bottom: 0px;
}

/* Add a box with the letters A, B, C, etc. */
.lead-capture-form .form-check-label span.radio-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10%;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* When a radio option is selected, change the appearance */
.lead-capture-form .radio-option.selected .form-check-label span.radio-letter {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.lead-capture-form .radio-option.selected {
    background-color: #e6e6e6;
    border-color: #333;
}
/* End Radio Selector */

/* Start CheckBox Selector */
.lead-capture-form .checkbox-option {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    position: relative;
}

.lead-capture-form .checkbox-option:hover {
    background-color: #f1f1f1;
    border-color: #bbb;
}

.lead-capture-form .checkbox-option::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #333;
    border-radius: 4px;
    margin-right: 15px;
    background-color: white;
    display: inline-block;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.lead-capture-form .checkbox-option.selected {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.lead-capture-form .checkbox-option.selected::before {
    background-color: white;
    border-color: white;
}

.lead-capture-form .checkbox-option.selected::after {
    content: '✓';
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

.lead-capture-form .checkbox-option .form-check-input {
    display: none;
}

.lead-capture-form .checkbox-option.selected .form-check-label {
    color: #fff;
}
/* End CheckBox Selector */


/* Progress bar and form steps */
.lead-capture-form .form-progress {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    margin-top: 20px;
    text-align: center; /* Center progress text */
}

/* Custom Pop-up Styles */
.alert-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* High z-index to appear above everything */
}

.alert-popup.hidden {
    display: none;
}

.alert-popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    max-width: 400px; /* Limit the max width */
    width: 90%; /* Ensure responsiveness by allowing it to shrink */
    text-align: center;
    word-wrap: break-word;
    word-break: break-word; /* Ensure text breaks in all cases */
    overflow-wrap: break-word;
}

#alert-message {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.popup-close-btn {
    padding: 10px 20px;
    background-color: #ff7f50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.popup-close-btn:hover {
    background-color: #e06b45;
}

#alert-title {
    font-weight: bold;
    font-size: 20px; /* You can also adjust the size if needed */
    margin-bottom: 10px; /* Add some space below the title */
    color: #333; /* Optional: Adjust the color if necessary */
    margin-bottom: 10px;
}

@keyframes blink {
    0% { background-color: #ffffff; }  /* White */
    50% { background-color: #ffff00; } /* Yellow flash */
    100% { background-color: #ffffff; } /* White */
}

/* Blinking class to be applied to the radio-option */
.blink {
    animation: blink 0.5s ease-in-out;
}

/* Ensure form container maintains consistent height */
.lead-capture-form .form-step {
    min-height: 300px; /* Adjust this value based on the expected content */
    transition: all 0.5s ease; /* Smooth transition between steps */
}

/* Fade out the current step and fade in the next step */
.lead-capture-form .form-step {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lead-capture-form .form-step.active {
    opacity: 1;
}


#lead-capture-loading {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 20px auto;
}

.skeleton-title {
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 25px;
    width: 70%;
}

.skeleton-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fafafa;
}

.skeleton-letter {
    width: 32px;
    height: 32px;
    background: #ddd;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.skeleton-text {
    height: 18px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 3px;
    flex: 1;
}

.skeleton-text:nth-child(2n) { width: 80%; }
.skeleton-text:nth-child(3n) { width: 90%; }
.skeleton-text:nth-child(4n) { width: 75%; }

.loading-indicator {
    text-align: center;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.skeleton-button {
    width: 100%;
    height: 50px;
    background: linear-gradient(90deg, #e0e0e0 25%, #d0d0d0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-top: 20px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
