/* quizcard/quizcard.css */

.gsg-quiz-card {
    width: 100%; /* Changed to 100% width */
    height: 200px; /* Changed to 200px height */
    border: 1px solid #ddd;
    padding: 15px;
    box-sizing: border-box; /* Include padding in dimensions */
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: row; /* KEEP as row for landscape banner (question/options) */
    justify-content: space-around; /* Distribute content horizontally */
    align-items: center; /* Center vertically */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px auto; /* Center for demo, adjust as needed for banner placement */
    border-radius: 1px; /* Slightly rounded corners */
    overflow: hidden; /* Ensure content stays within bounds */
    position: relative; /* Needed for positioning the overlay */
}

.gsg-quiz-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); 
    z-index: 1; /* Place it above the background image but below content */
}

.gsg-quiz-content {
    position: relative; /* Position content above the overlay */
    z-index: 2; /* Ensure content is on top */
    display: flex;
    flex-direction: row; /* Keep content layout as row for desktop (question and options side-by-side) */
    justify-content: space-between; /* Space between question and options */
    align-items: center;
    width: 100%; /* Take full width of the card */
    height: 100%; /* Take full height of the card */
}


.gsg-quiz-card h3 {
    margin: 0 15px; /* Adjust margin for horizontal flow */
    font-size: 1.25em;
    color: #1a1a1a;
    line-height: 1.3;
    flex-basis: 48%; /* Adjust to roughly 50% for question area */
    min-width: 150px; /* Ensure it doesn't get too squished */
    text-align: right; /* Align question to the right if options are on the left */
    box-sizing: border-box; /* Include padding in dimensions */
    padding-right: 15px; /* Add some padding on the right for separation */
}

.gsg-quiz-options {
    width: auto; /* Auto width to fit content */
    flex-basis: 48%; /* Adjust to roughly 50% for options area */
    flex-grow: 0; /* Prevent it from growing excessively, maintain 50% */
    display: flex;
    flex-direction: row; /* Changed to row for horizontal buttons */
    flex-wrap: wrap; /* Allow buttons to wrap if needed */
    justify-content: center; /* Center buttons horizontally */
    align-items: center; /* Center buttons vertically */
    gap: 10px; /* Space between buttons (reduced slightly) */
    padding: 0 10px;
    box-sizing: border-box; /* Include padding in dimensions */
    padding-left: 15px; /* Add some padding on the left for separation */
}

.gsg-quiz-option-btn {
    flex: 1 1 auto; /* Allow buttons to grow/shrink, but not stretch excessively */
    min-width: 80px; /* Minimum width for buttons */
    max-width: 150px; /* Maximum width for buttons */
    padding: 5px 8px; /* Adjusted vertical padding */
    background-color: #219fcc; /* WordPress blue */
    color: white;
    border: none;
    border-radius: 1px;
    cursor: pointer;
    font-size: 0.8em; /* Slightly smaller font for compactness */
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1px; /* Smaller gap */
    text-align: center;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.gsg-quiz-option-btn:hover:not(:disabled) {
    transform: translateY(-1px); /* Slight lift on hover */
}

.gsg-quiz-option-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    box-shadow: none;
}

.gsg-quiz-vote-count, .gsg-quiz-vote-percent {
    font-weight: bold;
    white-space: nowrap; /* Prevent numbers from wrapping */
    font-size: 0.8em; /* Smaller font for counts/percents */
}

.gsg-quiz-see-results-btn {
    display: none; /* Explicitly hide this button */
}

.gsg-quiz-results {
    width: auto; /* Auto width for results */
    flex-basis: 48%; /* Adjust to roughly 50% for results area */
    flex-grow: 0; /* Prevent it from growing excessively, maintain 50% */
    padding: 0 10px;
    margin: 0 15px; /* Adjust margin for horizontal flow */
    font-size: 0.9em; /* Slightly smaller font for results */
    text-align: left;
    display: flex; /* Keep flex for inner alignment */
    flex-direction: column; /* Results list items stack */
    justify-content: center;
    min-width: 150px; /* Give results some space */
    box-sizing: border-box; /* Include padding in dimensions */
    padding-left: 15px; /* Add some padding on the left for separation */
}

.gsg-quiz-results h4 {
    margin-bottom: 5px; /* Reduced margin */
    margin-top: 0;
    color: #555;
    font-size: 0.85em;
    text-align: center;
}

.gsg-quiz-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gsg-quiz-results-list li {
    padding: 4px 0; /* Reduced padding */
    border-bottom: 1px dotted #e0e0e0;
    color: #444;
    display: flex;
    justify-content: space-between; /* Align text and percentages */
    gap: 2px; /* Smaller gap */
    flex-wrap: wrap; /* Allow items to wrap if very long */
}

.gsg-quiz-results-list li:last-child {
    border-bottom: none;
}