/**
 * FELLES STYLING FOR KRLE-QUIZER
 * 
 * Dette stilarket brukes av alle KRLE multiple choice quizer.
 * Gir et konsistent utseende på tvers av ulike quizer.
 */

body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f0f0f0;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 95vh;
}

.quiz-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 700px;
}

.back-button {
    display: inline-block;
    padding: 8px 12px;
    margin-bottom: 20px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
}

.back-button:hover {
    background-color: #5a6268;
}

h1 {
    text-align: center;
    color: #d9534f;
    margin-bottom: 10px;
}

.quiz-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95em;
}

.question-area, .result-area {
    margin-bottom: 20px;
}

#question-number {
    font-size: 0.9em;
    color: #777;
    text-align: right;
    margin-bottom: 5px;
}

.question-text {
    font-size: 1.25em;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
}

.options button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    transition: background-color 0.2s, border-color 0.2s;
}

.options button:hover:not(:disabled) {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.options button.selected {
    background-color: #cce5ff;
    border-color: #004085;
}

.options button.correct {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
    font-weight: bold;
}

.options button.incorrect {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.options button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 1.05em;
    text-align: center;
    line-height: 1.5;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.navigation {
    margin-top: 25px;
    text-align: center;
}

.navigation button {
    padding: 12px 25px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
    margin: 0 5px;
}

.navigation button:hover:not(:disabled) {
    background-color: #c9302c;
}

.navigation button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

#score-text {
    font-size: 1.4em;
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Responsivt design */
@media (max-width: 600px) {
    .quiz-container {
        padding: 15px;
        margin: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    .question-text {
        font-size: 1.1em;
    }

    .options button {
        font-size: 0.95em;
        padding: 10px 12px;
    }
}
