/* Urban Legends Submission - Comments Styles */

/* コメントエリア全体 - ダークテーマ対応 */
#comments {
    margin-top: 3rem;
}

.c-commentList {
    padding-left: 0 !important;
}

.c-commentList li {
    list-style: none;
    margin-bottom: 1em;
}

.comments-area {
    max-width: 100%;
    color: #e0e0e0; /* 明るいグレーで読みやすく */
}

/* 見出し */

.post_content h2:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title)) {
    border-top: none;
    border-bottom: none;
}

.p-commentArea__title {
    display: none;
}

/* コメントリスト */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 1rem;
}

/* 個別コメント - ダークテーマ対応 */
.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08); /* 透明感のある白 */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
    color: #e0e0e0;
}

.comment:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 返信コメント（depth-2）*/
.depth-2 {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* コメントメタ情報 */
.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-author .avatar {
    border-radius: 50%;
    border: 2px solid #fff;
}

.comment-author .fn {
    font-weight: bold;
    color: #f0f0f0; /* 明るく調整 */
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #b0b0b0; /* より明るいグレー */
}

.comment-metadata a {
    color: #b0b0b0;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #e0e0e0;
}

/* コメント本文 */
.comment-content {
    margin: 1rem 0;
    line-height: 1.8;
    color: #e0e0e0; /* ダークテーマに合わせて明るく */
}

.comment-content p {
    margin-bottom: 0.8rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* 返信リンク */
.reply {
    margin-top: 0.5rem;
}

.comment-reply-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background-color 0.3s;
}

.comment-reply-link:hover {
    background: #555;
    color: #fff;
}

/* コメントフォーム */
#respond {
    margin-top: 3rem;
}

.comment-respond .comment-reply-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #f0f0f0; /* ダークテーマ対応 */
}

.comment-form {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05); /* 透明感のある背景 */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-form p {
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #f0f0f0; /* ダークテーマ対応 */
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    transition: border-color 0.3s, background-color 0.3s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* 送信ボタン */
.comment-form .submit {
    background: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.comment-form .submit:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* クッキー保存チェックボックス */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 0.3rem;
    width: auto;
}

.comment-form-cookies-consent label {
    font-weight: normal;
    font-size: 0.9rem;
    color: #b0b0b0; /* ダークテーマ対応 */
    margin-bottom: 0;
}

/* コメントなしの場合 */
.no-comments {
    text-align: center;
    padding: 3rem;
    color: #b0b0b0; /* ダークテーマ対応 */
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

/* 承認待ちメッセージ */
.comment-awaiting-moderation,
.moderation-message {
    background: rgba(255, 193, 7, 0.15) !important;
    color: #ffd700 !important;
    padding: 0.8rem 1rem !important;
    border-radius: 4px !important;
    border-left: 4px solid #ffd700 !important;
    margin: 0.5rem 0 !important;
    font-style: italic !important;
}

/* ページネーション */
.comment-navigation {
    margin: 2rem 0;
    display: flex;
    justify-content: space-between;
}

.comment-navigation a {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
}

.comment-navigation a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* プレースホルダーテキストの色 */
.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: #888;
    opacity: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #comments {
        padding: 2rem 1rem 1rem;
    }

    .comment-list .children {
        padding-left: 1rem;
    }

    .comment {
        padding: 1rem;
    }

    .comment-form {
        padding: 1.5rem;
    }

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        font-size: 16px; /* iOS のズーム防止 */
    }
}