/**
 * Стили для плагина Christianity Test
 * Использует CSS-переменные темы для цветов
 */

.christianity_test_wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--widget-bg, #fff);
    color: var(--text-color, #333);
}

.christianity_test_wrapper .title {
    margin-bottom: 20px;
}

.christianity_test_wrapper h3 {
    margin: 20px 0 10px;
}

.christianity_test_wrapper h4 {
    margin: 15px 0 10px;
}

/* Кнопки - используем стандартные стили темы */
.christianity_test_wrapper .btn151,
.christianity_test_wrapper input[type="button"],
.christianity_test_wrapper .button {
    /* Оставляем только базовые отступы, цвета берем из темы */
    cursor: pointer;
    background: var(--link-color, #4CAF50);
    color: var(--body-bg); /* Белый текст на акцентном цвете */
}

.christianity_test_wrapper .btn151:hover,
.christianity_test_wrapper input[type="button"]:hover,
.christianity_test_wrapper .button:hover {
    opacity: 0.9;
}

.christianity_test_wrapper .btn151:disabled,
.christianity_test_wrapper input[type="button"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Поля ввода - наследуем стили темы */
.christianity_test_wrapper input[type="text"] {
    margin: 10px 0;
    background: var(--body-bg, #fff);
    color: var(--text-color, #333);
}

/* Списки */
.christianity_test_wrapper ul {
    list-style-type: none;
    padding-left: 0;
}

.christianity_test_wrapper li {
    margin: 5px 0;
}

/* Сообщения */
.christianity_test_wrapper #com_msg,
.christianity_test_wrapper #skip_msg,
.christianity_test_wrapper #reset_msg {
    margin-left: 10px;
}

/* Прогресс-бар таймера */
#tmr {
    transition: width 0.05s linear;
}

/* Кнопки в модальном окне */
.dnev_btn {
    margin: 5px;
}

#bttx {
    color: #ff0000;
}

/* Верхний блок с топом */
.christianity_test_top {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Ссылки */
.christianity_test_wrapper a {
    color: var(--link-color, #0073aa);
}

.christianity_test_wrapper a:hover {
    text-decoration: underline;
}

/* Результаты в процентах */
.percentage-high {
    color: var(--accent-color, #46b450);
    font-weight: bold;
}

.percentage-medium {
    color: #ffb900;
    font-weight: bold;
}

.percentage-low {
    color: #dc3232;
    font-weight: bold;
}

/* Модальное окно - используем переменные темы */
#question-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--widget-bg, #fff);
    color: var(--text-color, #333);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    overflow: hidden;
	--correct-color: #0c0;
}

#question-modal .modal-title{
	margin: 0;
}

#question-modal h3{
	margin-top: 0;
}

.ct-modal-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.ct-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    z-index: 10001;
}

.ct-modal-close:hover {
    color: #333;
}

.modal-header {
    padding: 15px 20px;
    background: var(--body-bg, #f8f9fa);
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Анимация модального окна */
.ct-modal-animate-in {
    animation: ctModalIn 0.3s ease;
}

@keyframes ctModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    #question-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 120px);
    }
}

/* Дополнительные классы для ответов */
.correct-answer {
    color: var(--correct-color, #009900);
}

.wrong-answer {
    color: #cccccc;
    text-decoration: line-through;
}

.correct {
    color: var(--correct-color, #009900);
}

.wrong {
    color: #ff0000;
}

.timeout {
    color: #f46e42;
}

.warning {
    color: #ff0000;
}

.multi-hint {
    font-size: 0.9em;
    margin-bottom: 20px;
    padding-left: 20px;
}

.timer-container {
    width: 70%;
    height: 10px;
    margin: 20px auto;
    text-align: center;
    position: relative;
}

.timer-progress-wrapper {
    width: 100%;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.timer-progress {
    height: 100%;
    background: var(--correct-color, #4CAF50);
    width: 100%;
    transition: width 0.3s linear;
	float: right;
}

.timer-text {
    padding-top: 12px;
    text-align: center;
    font-size: 14px;
    color: var(--text-color, #333);
}

#time-remaining {
    font-weight: bold;
}

/* Топ пользователей */

.christianity-test-top-wrapper .christianity-test-top-list {
    padding: 0;
    margin: 0;
}

.christianity-test-top-list li {
    padding: 10px 10px 10px 0;
    margin: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.christianity-test-top-list li:last-child {
    border-bottom: none;
}

.christianity-test-top-list li .avatar {
	width: 50px;
	height: 50px;
	margin-right: 10px;
	border-radius: 5px;
}

.christianity-test-top-list li .avatar .profile-photo {
	line-height: 50px;
}

.ct-modal input[type="radio"],
.ct-modal input[type="checkbox"]{
	vertical-align: -0.15em;
	padding: 0;
	height: 1.2em;
	width: 1.2em;
}

.top-position {
    font-weight: bold;
    margin-right: 10px;
    min-width: 40px;
    color: var(--accent-color, #4CAF50);
}

.top-name {
    flex: 1;
    font-weight: 500;
}

.top-stats {
    margin-left: 10px;
    color: #666;
    font-size: 0.9em;
}

/* Цвета для первых трех мест */
.top-item-1 .top-position {
    color: gold;
    font-size: 1.2em;
}

.top-item-2 .top-position {
    color: silver;
    font-size: 1.1em;
}

.top-item-3 .top-position {
    color: #cd7f32; /* бронза */
}

/* Адаптивность */
@media (max-width: 768px) {
    .christianity-test-top-list li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .top-stats {
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
    }
}