/* Simple Diagnostic Tool Styles */

.sdt-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.sdt-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 600;
}

.sdt-container > p {
    text-align: center;
    font-size: 1.1em;
    color: #666;
    margin-bottom: 40px;
}

/* 進捗バー */
.sdt-progress {
    margin-bottom: 30px;
    text-align: center;
}

.sdt-progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.sdt-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.sdt-progress-text {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

/* 再診断制限通知 */
.sdt-restriction-notice {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.sdt-restriction-notice h3 {
    color: #856404;
    margin: 0 0 15px 0;
    font-size: 1.4em;
    font-weight: 600;
}

.sdt-restriction-notice p {
    color: #856404;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.sdt-restriction-notice p:last-of-type {
    margin-bottom: 20px;
    font-weight: 500;
}

/* 問題スタイル */
.sdt-question {
    background: #fff;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: none;
}

.sdt-question.active {
    display: block;
    animation: slideIn 0.5s ease-out;
}

.sdt-question:hover {
    border-color: #3498db;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.1);
}

.sdt-question h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.sdt-question p {
    font-size: 1.1em;
    margin: 0 0 20px 0;
    color: #555;
    line-height: 1.5;
}

/* 選択肢スタイル */
.sdt-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sdt-options label {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 100px;
    justify-content: center;
}

.sdt-options label:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-2px);
}

.sdt-options label.selected {
    background: #2196f3;
    border-color: #1976d2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.sdt-options input[type="radio"] {
    display: none;
}

/* ナビゲーションボタン */
.sdt-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.sdt-prev,
.sdt-next {
    padding: 12px 25px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 150px;
}

.sdt-prev:hover,
.sdt-next:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.sdt-next {
    background: #3498db;
}

.sdt-next:hover {
    background: #2980b9;
}

/* 最初の問題では前のボタンを非表示、最後の問題では次のボタンを非表示 */
.sdt-question:first-child .sdt-prev,
.sdt-question:last-child .sdt-next {
    display: none;
}

/* 最初の問題では次のボタンを中央に配置 */
.sdt-question:first-child .sdt-navigation {
    justify-content: center;
}

/* 最後の問題では前のボタンを中央に配置 */
.sdt-question:last-child .sdt-navigation {
    justify-content: center;
}

/* 送信ボタン（診断結果を見る）をナビゲーションから分離 */
.sdt-submit {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sdt-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sdt-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}



/* 結果表示 */
.sdt-result {
    background: #fff;
    border: 2px solid #27ae60;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.1);
}

.sdt-result h3 {
    color: #27ae60;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
}

.sdt-result h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.sdt-result p {
    font-size: 1.1em;
    margin: 0 0 20px 0;
    color: #555;
}

.result-detail {
    background: #f8f9fa;
    border-left: 4px solid #27ae60;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.result-detail p {
    margin: 0 0 10px 0;
}

.result-detail p:last-child {
    margin-bottom: 0;
}

/* トップページボタン */
.sdt-homepage-btn {
    display: inline-block;
    padding: 12px 25px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.sdt-homepage-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .sdt-container {
        padding: 15px;
    }
    
    .sdt-question {
        padding: 20px;
    }
    
    .sdt-options {
        flex-direction: column;
    }
    
    .sdt-options label {
        width: 100%;
        justify-content: center;
    }
    
    .sdt-navigation {
        flex-direction: row;
        gap: 10px;
    }
    
    .sdt-prev,
    .sdt-next {
        flex: 1;
        max-width: none;
        width: auto;
        min-width: 120px;
    }
    
    .sdt-submit {
        max-width: 100%;
        width: 100%;
        margin-top: 30px;
    }
    
    .sdt-homepage-btn {
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sdt-result {
    animation: fadeIn 0.5s ease-out;
}

.sdt-result {
    animation: fadeIn 0.5s ease-out;
}

/* ローディング状態 */
.sdt-submit:disabled {
    position: relative;
}

.sdt-submit:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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