/* QuizBomb Plugin Styles */

[id^=quiz-container] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f9;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    margin: 2rem 0;
    text-align: center;
}

.quiz {
    position: relative;
    padding: 1rem;
    text-align: left;
}

.quiz-question-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quiz h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* General List Styles */
.quiz ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quiz li {
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.quiz li:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quiz li.selected {
    border-color: #0073aa;
    background-color: #eef2f7;
    box-shadow: 0 4px 12px rgba(0,115,170,0.2);
}

/* Text-based answer list */
.quiz ul:not(.answers-grid) li label {
    display: block;
    width: 100%;
    cursor: pointer;
}

.quiz ul:not(.answers-grid) input[type="radio"] {
    margin-right: 10px;
}

/* Image-based answer grid */
.answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.answer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem;
}

.answer-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 0.75rem;
}

.answer-text {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.3;
}


.quiz button, .result button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.2s;
}

.quiz button:hover, .result button:hover {
    background-color: #005a87;
}

.quiz-pagination {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.9rem;
    color: #666;
    background-color: #e9e9e9;
    padding: 5px 10px;
    border-radius: 15px;
}

.result {
    padding: 2rem;
    text-align: center;
}

.result h2 {
    font-size: 2rem;
    color: #0073aa;
    margin-bottom: 1rem;
}

.result p {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.6;
}

.quiz-loader {
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #0073aa;
    width: 60px;
    height: 60px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
    margin: 2rem auto;
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
