/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f4f8;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden; /* This is the key change to prevent horizontal scrolling */
}

* {
    box-sizing: border-box; /* Ensure padding and borders are included in the element's total width and height */
}

/* Main Form Container */
#mainFormContainer {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transition: all 0.3s ease-in-out;
    margin: 1rem;
}

/* Form Title and Subtitle */
.form-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.form-subtitle {
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Step-by-Step Form Layout */
.step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.step.active {
    display: block;
}

/* Question Styles */
.question {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #34495e;
}

/* Input Fields and Labels */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="tel"],
select {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus {
    outline: none;
    border-color: #3498db;
}

/* Radio Button Styling */
.radio-group {
    display: flex;
    flex-wrap: wrap; /* Allow radio buttons to wrap to the next line on small screens */
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
}

.radio-group label {
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Signature Canvas */
#signature-pad {
    margin-top: 1rem;
    text-align: center;
}

#signatureCanvas {
    border: 2px dashed #bdc3c7;
    background-color: #ecf0f1;
    cursor: crosshair;
    width: 100%; /* Make the canvas fully responsive */
    max-width: 450px;
    height: 150px;
    border-radius: 8px;
}

#clearBtn {
    margin-top: 0.5rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#clearBtn:hover {
    background-color: #c0392b;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.navigation-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#prevBtn {
    background-color: #bdc3c7;
    color: #2c3e50;
}

#prevBtn:hover {
    background-color: #95a5a6;
}

#nextBtn {
    background-color: #2ecc71;
    color: white;
}

#nextBtn:hover {
    background-color: #27ae60;
}

#agreeBtn {
    background-color: #3498db;
    color: white;
    width: 100%;
}

#agreeBtn:hover {
    background-color: #2980b9;
}

.privacy-notice {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Thank You Message */
#thankYouMessage {
    background-color: #2ecc71;
    color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

/* Review Step */
#reviewContent {
    text-align: left;
    margin-top: 1rem;
}

.review-section h3 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: #34495e;
}

.review-section p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 600px) {
    #mainFormContainer {
        padding: 1rem;
        width: 95%;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .question {
        font-size: 1rem;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .navigation-buttons button {
        width: 100%;
    }
}
