/* General body and container styles */
body {
    font-family: 'Inter', sans-serif; /* Assumed from previous interaction, ensure you add this if not already */
    margin: 0;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for longer forms */
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

#quiz-container {
    border-radius: 12px;
    box-sizing: border-box;
    position: relative;
    padding-top: 50px; /* Space for progress bar */
    background-color: #1a402d;
}

@media only screen and (max-width: 768px) {
    #quiz-container {
        max-width: 100% !important;
    }
}


/* Section styling */
.section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* Logo and Survey Title */
/* No specific styling on the img tag itself, its container centers it */

/* Notice styles */
.notice {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0px rgba(255, 255, 0, 0); }
    50% { transform: scale(1.01); box-shadow: 0 0 10px rgba(255, 255, 0, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 0px rgba(255, 255, 0, 0); }
}

/* Collapsible Introduction */
.introduction summary {
    list-style: none; /* Hide default arrow */
    display: flex;
    align-items: center;
}

.introduction summary::-webkit-details-marker {
    display: none; /* Hide default arrow for Webkit browsers */
}

.introduction .toggle-icon {
    transition: transform 0.2s ease-in-out;
    margin-left: 0.5rem;
}

.introduction[open] .toggle-icon {
    transform: rotate(180deg);
}

.introduction-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.introduction[open] .introduction-content {
    max-height: 3000px; /* Increased max-height to better contain overflowing text */
    overflow: visible; /* Allows content to be visible */
}


/* Question styling */
.question label {
    font-weight: 500;
}

.form-radio {
    appearance: none; /* Hide default radio button */
    border: 2px solid #4a5568; /* Custom border */
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.form-radio:checked {
    background-color: #48bb78; /* Fill color when checked */
    border-color: #48bb78;
}

.form-radio:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: white; /* Inner dot color */
}

.form-radio:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.5); /* Focus ring */
}

/* Button styling */
button {
    cursor: pointer;
    outline: none;
    background-color: #d7f775;
    color: #17271f;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Progress bar styling */
.progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    height: 10px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.progress-bar {
    height: 100%;
    background-color: #d7f775;
    width: 0%;
    border-top-left-radius: 12px;
    transition: width 0.3s ease-in-out;
}

.progress-text {
    position: absolute;
    top: 15px;
    right: 2rem;
    font-size: 0.875rem;
    color: #a0aec0;
}

/* Custom message box */
.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2d3748;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    text-align: center;
    color: #e2e8f0;
    border: 1px solid #48bb78;
    font-size: 1.1rem;
}
.message-box button {
    margin-top: 20px;
    background-color: #48bb78;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}
.message-box button:hover {
    background-color: #38a169;
}


/* Add this to your style.css */
.hidden-conditional-q {
    display: none;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none; /* Disable interaction when hidden */
    max-height: 0; /* Ensures it collapses fully */
    overflow: hidden;
    padding: 0 !important; /* Override padding when hidden */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-color: transparent !important; /* Hide border when hidden */
}

.visible-conditional-q {
    display: block; /* Or flex, depending on content */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: fit-content; /* Allows content to define height */
    padding: 1.5rem !important; /* Reapply padding */
    margin-top: 2rem !important; /* Reapply margin */
    margin-bottom: 2rem !important;
    border-color: #4a5568 !important; /* Reapply border color */
}

/* Also add the following to your existing table styles to make cells look better */
table {
    /* ... existing table styles ... */
    border-collapse: separate; /* Required for rounded corners on inner cells */
    border-spacing: 0; /* Remove space between cells */
}

th, td {
    /* ... existing th, td styles ... */
    border: none; /* Remove default cell borders */
}

/* Add custom borders for cells to create the grid effect */
th:not(:last-child), td:not(:last-child) {
    border-right: 1px solid #4a5568;
}
tr:not(:last-child) td, tr:not(:last-child) th {
    border-bottom: 1px solid #4a5568;
}



#start-quiz-btn, #next-1-btn, #next-2-btn, #next-3-btn, #next-4-btn, #next-5-btn {
    background-color: #d7f775;
    color: #17271f;
}

.question {
    background-color: #fff;
    color: #1a402d !important;
}
