/* File: /css/storybit-trivia-style.css */
/* ---------------------------------------------------------------------------------------------------------------- */

/* Trivia-SPINNER */
/* ---------------------------------------------------------------------------------------------------------------- */

/* Full-screen Overlay */
.trivia-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000; /* Ensure it is above other elements */
    display: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Ensure the background doesn't repeat */
}

.trivia-overlay .interstitial {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.trivia-overlay .button-container {
    margin-top: 20px;
}

.trivia-overlay button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
}

.trivia-overlay button:hover {
    background-color: #005a87;
}

/* Trivia Container */
#trivia-container {
    position: relative;
    z-index: 1001; /* Ensure the trivia container is on top of the overlay */
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent dark gray background */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 1.2em;
    margin: 10% auto; /* Adjust as needed for vertical positioning */
    max-width: 80%;
    color: white; /* Text color for dark background */
}

/* Trivia Header */
#trivia-header {
    margin-bottom: 20px; /* Add space between header and questions */
}

/* Trivia Text */
#trivia-text {
    font-size: 0.9em;
    font-weight: bold;
}

/* Trivia Question */
#trivia-question {
    font-size: 1.5em; /* Make the trivia question larger */
    margin-bottom: 20px; /* Add space between question and answers */
}

/* Trivia Answers List */
#trivia-answers {
    list-style-type: none;
    padding: 0;
}

#trivia-answers li {
    margin-bottom: 20px;
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* Smooth transition for background color change */
}

#trivia-answers .answer-text {
    display: block; /* Make sure the text takes up the whole space of the li */
}

/* Correct Answer */
#trivia-answers li.correct-answer {
    background-color: #00cc00; /* Light Green */
}

/* Incorrect Answer */
#trivia-answers li.incorrect-answer {
    background-color: #ff3333; /* Light Red */
}

/* Selected Answer */
#trivia-answers li.selected-answer {
    background-color: #ffff66; /* Light Yellow */
}

/* Explanation Container */
#explanation-container {
    display: none; /* Initially hidden */
    margin-top: 20px;
    color: white;
    font-size: 24px; /* Adjust the font size to your desired value */
}

.explanation-text {
    font-size: 24px; /* Adjust the font size to your desired value */
}

/* Correct Result Title */
.result-title-correct {
	font-size: 18px;
    font-weight: bold;
    color: #00cc00; /* Green */
}

/* Incorrect Result Title */
.result-title-incorrect {
	font-size: 18px;
	font-weight: bold;
    color: #ff3333; /* Red */
}


/* Trivia Interstitial */
/* ---------------------------------------------------------------------------------------------------------------- */



/* Updated CSS for the interstitial overlay */
.interstitial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Semi-transparent black background */
    z-index: 1050; /* Higher than trivia-overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

/* Ensure interstitial text is readable and consistent with form styling */
.interstitial p {
    color: #ffffff; /* Lighter color for better readability */
    margin-bottom: 20px;
    word-wrap: break-word; /* Allows long words to be broken and wrapped to the next line */
    max-width: 80%; /* Set a max width for the text to support wrapping */
    margin-left: auto; /* Center the text block horizontally */
    margin-right: auto; /* Center the text block horizontally */
}

/* Adjust the video to fit the interstitial */
.interstitial video {
    max-width: 80%; /* Controls the video size within overlay */
    max-height: 80%;
    margin-top: 20px; /* Adds margin from the top */
    border-radius: 40px; /* Adds rounded corners */
}

/* Button container to align buttons next to each other */
.interstitial .button-container {
    display: flex;
    justify-content: center; /* Center the buttons horizontally */
    align-items: center; /* Align the buttons vertically */
}

/* CSS for the buttons inside the interstitial */
#show-trivia, #hide-trivia {
	width: 100px; /* Set width of each button to 100px */
    margin: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #5c6bc0; /* Background color matching the form button */
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px; /* Font size matching the form elements */
    transition: background-color 0.3s ease;
}

#hide-trivia {
    background-color: #dc3545; /* Different color for 'No' button */
}

#show-trivia:hover, #hide-trivia:hover {
    background-color: #3949ab; /* Darken button on hover, matching the form button hover */
}
