/**
 * detail.css - 質問詳細ページ固有のスタイル
 * v1.92L26: view/index.phpの$additional_stylesから外部化
 */


/* 参考ページと同じ設定 */
html {
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-size: 1.5rem; /* 15px */
}

/* 質問詳細ページ固有のスタイル */
.question-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-category {
    background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.question-date {
    color: #000;
    font-size: 1.5rem; /* 15px */
}

/* 質問タイトル（1行目）: スマホ15px、PC16px */
.question-title {
    font-size: 1.5rem; /* 15px */
    font-weight: 700; /* 太字 */
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.6; /* v1.87L03: 統一 */
}

/* 質問本文（2行目以降）: スマホ15px、PC16px */
.question-content {
    font-size: 1.5rem; /* 15px */
    line-height: 1.6; /* v1.87L03: 統一 */
    font-weight: normal; /* 太字なし */
    color: #000;
    margin-bottom: 1.5rem;
}

/* PC用（768px以上） */
@media screen and (min-width: 768px) {
    .question-title {
        font-size: 1.6rem; /* 16px */
        line-height: 1.6;
    }
    .question-content {
        font-size: 1.6rem; /* 16px */
        line-height: 1.6;
    }
    .related-question-title {
        font-size: 1.6rem; /* v1.87L07: PC 16px */
        line-height: 1.6;
    }
}

.question-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: #f5f5f5;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.2s;
}

.like-button:hover {
    background: #ebebeb;
    transform: translateY(-1px);
}

.like-button.liked {
    background: linear-gradient(135deg, #8b6f47 0%, #d4af37 100%);
    color: white;
}

.question-meta {
    display: flex;
    gap: 1.5rem;
    color: #000;
    font-size: 1.4rem;
}

/* 回答セクション */
.answers-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.answers-header {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    color: #000000;
}

.answer-card {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.answer-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.responder-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* v1.89L36: 回答者アバター */
.responder-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.responder-name {
    font-weight: 600;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.responder-gender {
    font-size: 1.2rem; /* 12px */
    color: #003366;
    font-weight: normal;
}

.responder-column-link {
    font-size: 1.2rem; /* 12px */
    color: #d4af37;
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid #d4af37;
    border-radius: 3px;
    font-weight: normal;
    transition: all 0.3s;
}

.responder-column-link:hover {
    background: #d4af37;
    color: white;
}

/* v1.89L36: 回答者の肩書 */
.responder-title {
    font-size: 1.4rem; /* 14px */
    color: #8B7500; /* v1.91L19: Dark gold close to black */
    margin-top: 2px;
}

/* v1.89L36: 回答者の一言コメント */
.responder-comment {
    font-size: 1.4rem; /* 14px */
    color: #000; /* v1.91L19: Changed to black */
    margin-top: 4px;
    font-style: italic; /* v1.91L19: Changed to italic */
}

.responder-badge {
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 1.2rem; /* 12px */
    color: #b8860b;
    font-weight: 600;
}

.best-answer-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 回答本文: PC/スマホ共に16px/15px */
.answer-content {
    font-size: 1.5rem; /* 15px */
    line-height: 1.6; /* v1.87L07: 統一 */
    color: #000;
    margin-bottom: 1rem;
}

/* v1.91L24: Adjust line spacing for p tags */
.answer-content p {
    margin: 0;
    padding: 0;
}

/* v1.91L79: Adjust line spacing for div tags (TinyMCE forced_root_block: div support) */
.answer-content div {
    margin: 0;
    padding: 0;
}

/* PC用（768px以上） */
@media screen and (min-width: 768px) {
    .answer-content {
        font-size: 1.6rem; /* v1.87L07: 16px */
        line-height: 1.6;
    }
}

.answer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.answer-date {
    color: #000;
    font-size: 1.5rem; /* 15px */
}

/* 関連質問 */
.related-questions {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.related-questions-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    color: #000000;
}

.related-question-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.related-question-item:last-child {
    border-bottom: none;
}

.related-question-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s;
}

.related-question-link:hover {
    opacity: 0.7;
}

.related-question-title {
    font-size: 1.5rem; /* v1.87L07: スマホ 15px */
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000000;
    line-height: 1.6;
}

.related-question-meta {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
    color: #000;
}

/* ソーシャルシェア */
.social-share {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    text-align: center;
}

.social-share-title {
    font-size: 1.4rem;
    color: #000;
    margin-bottom: 1rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.2s, opacity 0.2s;
}

.social-button:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.social-twitter { background: #000000; }
.social-line { background: #00c300; }
.social-hatena { background: #00a4de; }

@media (max-width: 768px) {
    .question-container, .answers-section, .related-questions {
        padding: 1.5rem;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .answer-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .related-question-title {
        font-size: 1.5rem; /* v1.87L07: スマホ 15px */
        line-height: 1.6;
    }
}

/* 質問者のコメント（返信）スタイル */
.questioner-comments {
    margin-top: 1.5rem;
    padding-left: 2rem;
    border-left: 3px solid #8b6f47;
}

.questioner-comment {
    background: #f9f7f5;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.questioner-badge {
    background: #8b6f47;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 600;
}

.questioner-name {
    font-weight: 600;
    color: #333;
    font-size: 1.4rem;
}

.comment-date {
    color: #666;
    font-size: 1.2rem;
    margin-left: auto;
}

.comment-content {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #333;
}

/* 返信フォームスタイル */
.reply-form-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.reply-toggle-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.4rem;
    color: #333;
    transition: all 0.3s;
}

.reply-toggle-btn:hover {
    background: #e8e8e8;
}

.reply-form {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.reply-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.5rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #8b6f47;
}

.reply-auth {
    margin-bottom: 1rem;
}

.reply-auth .auth-field {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-auth .auth-field label {
    font-weight: 600;
    font-size: 1.4rem;
    color: #333;
    white-space: nowrap;
    min-width: 120px;
}

.reply-auth input[type="email"],
.reply-auth input[type="password"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.4rem;
}

.reply-auth .help-text {
    margin-top: 0.5rem;
    font-size: 15px;
    color: #000;
}

.reply-actions {
    display: flex;
    gap: 1rem;
}

.reply-submit-btn,
.reply-cancel-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
}

.reply-submit-btn {
    background: #8b6f47;
    color: white;
    border: none;
}

.reply-submit-btn:hover {
    background: #6f5838;
}

.reply-cancel-btn {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.reply-cancel-btn:hover {
    background: #f5f5f5;
}

.reply-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1.4rem;
    display: none;
}

.reply-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.reply-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

@media screen and (max-width: 768px) {
    .questioner-comments {
        padding-left: 1rem;
    }
    
    .reply-actions {
        flex-direction: column;
    }
    
    .reply-submit-btn,
    .reply-cancel-btn {
        width: 100%;
    }
}
