@charset "utf-8";

/**
** type = default
** 何も選択されていない
**/

/* クイズセレクターコンテナ */
.wp-make-quiz-selector-container {
    margin: 0 0 30px 0;
    padding: 0;
    box-sizing: border-box;
}

/* クイズセレクター */
.wp-make-quiz-selector {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wp-make-quiz-selector h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.wp-make-quiz-category-selector,
.wp-make-quiz-count-selector {
    margin-bottom: 15px;
}

.wp-make-quiz-category-selector label,
.wp-make-quiz-count-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.wp-make-quiz-category-buttons {
    margin-bottom: 10px;
}

.wp-make-quiz-category-buttons button {
    margin-right: 10px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.wp-make-quiz-category-buttons button:hover {
    background: #e9ecef;
}

.wp-make-quiz-select-all-btn {
    background: #d4edda !important;
    color: #155724 !important;
    border-color: #c3e6cb !important;
}

.wp-make-quiz-select-all-btn:hover {
    background: #c3e6cb !important;
}

.wp-make-quiz-clear-all-btn {
    background: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb !important;
}

.wp-make-quiz-clear-all-btn:hover {
    background: #f5c6cb !important;
}

.wp-make-quiz-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.wp-make-quiz-categories label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.wp-make-quiz-categories label:hover {
    background: #e0e0e0;
}

.wp-make-quiz-categories input[type="checkbox"] {
    margin-right: 5px;
}

.wp-make-quiz-count-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 100px;
}

.wp-make-quiz-instruction {
    color: #666;
    font-style: italic;
    margin: 15px 0 0 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

/* 結果ボタンエリア */
.wp-make-quiz-result-buttons {
    margin-top: 20px;
    text-align: center;
}

.wp-make-quiz-result-buttons button {
    margin: 0 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.wp-make-quiz-restart-btn {
    background: #0073aa;
    color: white;
}

.wp-make-quiz-restart-btn:hover {
    background: #005a87;
}

.wp-make-quiz-select-new-btn {
    background: #28a745;
    color: white;
}

.wp-make-quiz-select-new-btn:hover {
    background: #218838;
}

/* クイズコンテナ */
.wp-make-quiz-container {
    margin: 0 0 30px 0;
    padding: 0;
    box-sizing: border-box;
}

/* クイズ開始画面 */
.wp-make-quiz-start {
    text-align: center;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

.wp-make-quiz-start h3 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 24px;
}

.wp-make-quiz-start p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
}

.wp-make-quiz-start-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.wp-make-quiz-start-btn:hover {
    background: #005a87;
}

/* クイズメイン画面 */
.wp-make-quiz-main {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

/* 進捗とスコア */
.wp-make-quiz-progress,
.wp-make-quiz-score {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

.wp-make-quiz-progress {
    float: left;
    margin-right: 15px;
}

.wp-make-quiz-score {
    float: right;
}

.wp-make-quiz-progress .current {
    color: #0073aa;
}

.wp-make-quiz-score .correct-count {
    color: #28a745;
}

/* 問題表示 */
.wp-make-quiz-question-wrapper {
    clear: both;
    padding-top: 20px;
}

.wp-make-quiz-question-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.wp-make-quiz-question-title .investment-number {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
}

.wp-make-quiz-question-image {
    text-align: center;
    margin: 15px 0;
}

.wp-make-quiz-question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wp-make-quiz-question-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

/* 選択肢 */
.wp-make-quiz-choices {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-make-quiz-choice {
    position: relative;
    background: #fff;
    border: 2px solid #ddd;
    cursor: pointer;
    font-weight: normal;
    padding: 15px 50px 15px 15px;
    margin: 0 0 10px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wp-make-quiz-choice:hover:not(.disabled) {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,123,170,0.2);
    transform: translateY(-1px);
}

.wp-make-quiz-choice:after {
    font-family: "dashicons";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ddd;
    line-height: 1;
}

/* 選択後の挙動 */
.wp-make-quiz-choice.disabled {
    cursor: auto;
    padding: 15px 50px 15px 15px;
}

.wp-make-quiz-choice.selected {
    border-color: #0073aa;
    background: #e3f2fd;
}

.wp-make-quiz-choice.highlight {
    border-color: #28a745;
    background: #d4edda;
}

/** 正解の場合 **/
.wp-make-quiz-choice.correct.highlight {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.wp-make-quiz-choice.correct.highlight:after {
    content: "\f147";
    color: #28a745;
}

/** 不正解の場合 **/
.wp-make-quiz-choice.incorrect.selected {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.wp-make-quiz-choice.incorrect.selected:after {
    content: "\f158";
    color: #dc3545;
}

/***
** 答えボックス
**/

.wp-make-quiz-answer {
    display: none;
    background: #fff;
    border: 1px solid #bbb;
    font-weight: normal;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-sizing: border-box;
    animation: wp-make-quiz-default-appear 0.5s ease;
}

.wp-make-quiz-result {
    margin: 0 0 15px 0;
    padding: 0;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
}

.wp-make-quiz-result .correct {
    color: #28a745;
}

.wp-make-quiz-result .incorrect {
    color: #dc3545;
}

.wp-make-quiz-correct-answer {
    background: #e3f2fd;
    border: 1px solid #0073aa;
    color: #0073aa;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.wp-make-quiz-commentary {
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

.wp-make-quiz-next-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s ease;
}

.wp-make-quiz-next-btn:hover {
    background: #005a87;
}

.wp-make-quiz-show-results-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.wp-make-quiz-show-results-btn:hover {
    background: #218838;
}

/* 結果サマリー */
.wp-make-quiz-result-summary {
    text-align: center;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 10px;
    padding: 30px;
}

.wp-make-quiz-result-summary h3 {
    margin: 0 0 20px 0;
    color: #0073aa;
    font-size: 24px;
}

.wp-make-quiz-final-score h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.wp-make-quiz-accuracy p {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
}

/**
** アニメーション
**/
@keyframes wp-make-quiz-default-appear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .wp-make-quiz-progress,
    .wp-make-quiz-score {
        float: none;
        margin-bottom: 10px;
    }
    
    .wp-make-quiz-choice {
        padding: 12px 40px 12px 12px;
    }
    
    .wp-make-quiz-start,
    .wp-make-quiz-result-summary {
        padding: 20px;
    }
}

/* 成績評価スタイル */
.wp-make-quiz-final-score .grade {
    font-size: 20px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
    text-align: center;
}

.wp-make-quiz-final-score .grade.excellent {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.wp-make-quiz-final-score .grade.good {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

.wp-make-quiz-final-score .grade.average {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.wp-make-quiz-final-score .grade.needs-improvement {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.wp-make-quiz-final-score .grade.poor {
    background: #f5c6cb;
    color: #721c24;
    border: 2px solid #dc3545;
}

/* 問題別結果スタイル */
.wp-make-quiz-accuracy h5 {
    margin: 20px 0 10px 0;
    color: #333;
    font-size: 16px;
}

.wp-make-quiz-accuracy .question-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-make-quiz-accuracy .question-results li {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    font-weight: bold;
}

.wp-make-quiz-accuracy .question-results li.correct {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.wp-make-quiz-accuracy .question-results li.incorrect {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}
