/* Vit Quiz Plugin Styles */

.vit-quiz {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 200px;
}

/* Loading Spinner */
.vit-quiz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.vit-quiz-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: vit-quiz-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes vit-quiz-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vit-quiz-loading-text {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.vit-quiz-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

.vit-quiz-question {
    margin-bottom: 40px;
}

.vit-quiz-question-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--vit-quiz-color-question-text, #d32f2f);
}

.vit-quiz-question-content {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}

.vit-quiz-question-content p {
    margin-bottom: 10px;
}

.vit-quiz .vit-quiz-question-image {
    margin-bottom: 20px;
    position: relative;
    padding: 0 !important;
}

.vit-quiz-question-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Image Caption */
.vit-quiz .vit-quiz-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: left;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    margin: 0;
}

.vit-quiz .vit-quiz-image-caption a {
    color: #fff;
    text-decoration: none;
}

.vit-quiz .vit-quiz-image-caption a:hover {
    text-decoration: underline;
}

.vit-quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vit-quiz-answer {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: var(--vit-quiz-color-answer-bg, #ffffff);
    cursor: pointer;
    transition: all 0.3s ease;
}

.vit-quiz-answer:hover {
    border-color: #999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vit-quiz-answer-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.vit-quiz-answer-input {
    margin-right: 10px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    min-width: 20px;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #999;
    border-radius: 3px;
    background-color: #fff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.vit-quiz-answer-input:checked {
    background-color: #2196F3;
    border-color: #2196F3;
}

.vit-quiz-answer-input:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.vit-quiz-answer-input:hover {
    border-color: #2196F3;
}

.vit-quiz-answer-input:focus {
    outline: 2px solid rgba(33, 150, 243, 0.3);
    outline-offset: 2px;
}

.vit-quiz-answer-text {
    flex: 1;
    font-size: 16px;
    color: var(--vit-quiz-color-answer-text, #333333);
    line-height: 1.5;
}

.vit-quiz-answer-image {
    margin-top: 10px;
    position: relative;
}

.vit-quiz-answer-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Answer states */
.vit-quiz-answer-correct {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.vit-quiz-answer-incorrect {
    background-color: #ffebee;
    border-color: #f44336;
}

.vit-quiz-answer-neutral {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.vit-quiz-answer-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #f5f5f5;
}

.vit-quiz-answer-input:disabled:checked {
    background-color: #ccc;
    border-color: #999;
}

.vit-quiz-answer-explanation {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.vit-quiz-answer-explanation p {
    margin: 0 0 10px 0;
}

.vit-quiz-answer-explanation p:last-child {
    margin-bottom: 0;
}

/* Results */
.vit-quiz-results {
    margin-top: 40px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.vit-quiz-result {
    text-align: center;
}

.vit-quiz-correct-count {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.vit-quiz-result-content {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--vit-quiz-color-result-text, #333333);
}

/* Share Wrapper (contains website link and sharing buttons) */
.vit-quiz-share-wrapper {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Sharing Buttons */
.vit-quiz-sharing {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vit-quiz-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.vit-quiz-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: #fff;
}

.vit-quiz-share-btn:active {
    transform: translateY(0);
}

.vit-quiz-share-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.vit-quiz-share-facebook {
    background-color: #1877F2;
}

.vit-quiz-share-facebook:hover {
    background-color: #166FE5;
}

.vit-quiz-share-twitter {
    background-color: #000000;
}

.vit-quiz-share-twitter:hover {
    background-color: #333333;
}

.vit-quiz-share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    background-color: #E4405F;
}

.vit-quiz-share-instagram:hover {
    background: linear-gradient(45deg, #e0852a 0%, #d55a2d 25%, #c91f34 50%, #b91a57 75%, #a91079 100%);
    background-color: #D32E4D;
}

/* Website Link */
.vit-quiz-website-link-container {
}

.vit-quiz-website-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    background-color: #2196F3;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.vit-quiz-website-link:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: #fff;
}

.vit-quiz-website-link:active {
    transform: translateY(0);
}

.vit-quiz-website-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Restart Button */
.vit-quiz-restart-container {
    margin-top: 30px;
    text-align: center;
}

.vit-quiz-restart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 6px;
    background-color: #2196F3;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.vit-quiz-restart-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.vit-quiz-restart-btn:active {
    transform: translateY(0);
}

.vit-quiz-restart-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.vit-quiz-result-content p {
    margin-bottom: 15px;
}

.vit-quiz-result-content p:last-child {
    margin-bottom: 0;
}

.vit-quiz-result-image {
    margin-top: 20px;
    position: relative;
}

.vit-quiz-result-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Progress Bar */
.vit-quiz-progress {
    margin-top: 40px;
    margin-bottom: 20px;
}

.vit-quiz-progress-bar {
    width: 100%;
    height: 40px;
    background-color: var(--vit-quiz-color-progress-bg, #e0e0e0);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.vit-quiz-progress-fill {
    height: 100%;
    background-color: var(--vit-quiz-color-progress-fill, #2196F3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    position: relative;
}

.vit-quiz-progress-text {
    color: var(--vit-quiz-color-progress-text, #ffffff);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

/* Continue Button */
.vit-quiz-continue-button {
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
}

.vit-quiz-continue-btn {
    background-color: var(--vit-quiz-color-continue-bg, #2196F3);
    color: var(--vit-quiz-color-continue-text, #ffffff);
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.vit-quiz-continue-btn:hover:not(:disabled) {
    background-color: #1976D2;
}

.vit-quiz-continue-btn:active:not(:disabled) {
    background-color: #1565C0;
}

.vit-quiz-continue-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}
