/**
 * 返信ローディング表示のスタイル
 */

/* ローディングコンテナ */
.replies-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    width: 100%;          /* 親要素の幅いっぱいを使う */
    box-sizing: border-box;
}

/* スピナー */
.replies-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* スピナーアニメーション */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ローディングテキスト */
.replies-loading-text {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}

/* ボタンのローディング状態 */
.loadReplies:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.loadReplies .fa-spinner {
    margin-right: 8px;
    vertical-align: middle;
}

/* 引用元ツイートカード */
.quoted_tweet_wrapper {
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 0.9em;
}

/* 引用元ツイートをクリック可能にする */
.quoted_tweet_wrapper.clickable-quote {
    cursor: pointer;
}

.quoted_tweet_wrapper.clickable-quote:hover,
.twitter_container.quoted_tweet:hover {    
    background-color: #f5f5f5;
}
.quoted_tweet .twitter_tweet {
    border-bottom: none;
}
.twitter_tweet:has(+ .quoted_tweet_wrapper) {
    border-bottom: none;
}
.quoted_tweet .twitter_icon {
    width:36px;
    height: 36px;
}
.quoted_tweet .twitter_name {
    font-size: 13.5px;
}
.quoted_tweet .twitter_id {
    font-size: 12px;
}

.twitter_container .quoted_tweet_wrapper .twitter_container.quoted_tweet {
    padding: 0;
    box-shadow: none;
    border: none;
    margin: 0;
}

.twitter_container .quoted_tweet_wrapper .twitter_container.quoted_tweet .twitter_button {
    display: none; /* 引用カードではボタン行を非表示 */
}

.twitter_container .quoted_tweet_wrapper .twitter_container.quoted_tweet .twitter_text {
    font-size: 0.9em;
    /* 引用元ツイートの本文を3行に制限 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 3); /* フォールバック用（行高 × 3行） */
    box-shadow: none;
}

/* 引用元ツイートの画像あり通知 */
.quoted_tweet_image_notice {
    display: inline-block;
    padding: 2px 10px;
    margin-top: 10px;
    margin-left: 4px;
    background-color: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    color: #666;
    font-size: 0.85em;
    font-weight: normal;
}

/* モーダル内の引用元ツイートでは本文の行数制限を解除 */
.modal-body .twitter_text {
    display: block;
    -webkit-line-clamp: none;
    line-clamp: none;
    overflow: visible;
    max-height: none;
}

@media (max-width: 768px) {
    .twitter_container .quoted_tweet_wrapper {
        margin-top: 10px;
        margin-bottom: 6px;
        padding: 6px 8px;
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .replies-loading {
        padding: 30px 15px;
    }
    
    .replies-loading-spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .replies-loading-text {
        font-size: 13px;
    }
}
