/* ============================================
   AIDB Agent Conversations - 会話表示スタイル
   ============================================ */

/* --- 記事下部 会話セクション --- */

.aidb-ac-section {
    margin-top: 48px;
    padding: 32px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.aidb-ac-header {
    margin-bottom: 24px;
    text-align: center;
}

.aidb-ac-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
}

.aidb-ac-subtitle {
    font-size: 0.9em;
    color: #718096;
    margin: 0;
}

/* --- 言語スイッチャー --- */

.aidb-ac-lang-switcher {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.aidb-ac-lang-btn {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.8em;
    color: #718096;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
}

.aidb-ac-lang-btn:hover {
    color: #2d3748;
    border-color: #a0aec0;
    background: #f7fafc;
}

.aidb-ac-lang-btn.aidb-ac-lang-active {
    background: #2d3748;
    color: #fff;
    border-color: #2d3748;
}

/* --- メッセージ --- */

.aidb-ac-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aidb-ac-message {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 24px;
    border-left: 4px solid #4a90d9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.aidb-ac-message:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ペルソナ別の左ボーダー色 */
.aidb-ac-message:nth-child(5n+1) { border-left-color: #4a90d9; }
.aidb-ac-message:nth-child(5n+2) { border-left-color: #e67e22; }
.aidb-ac-message:nth-child(5n+3) { border-left-color: #27ae60; }
.aidb-ac-message:nth-child(5n+4) { border-left-color: #8e44ad; }
.aidb-ac-message:nth-child(5n+5) { border-left-color: #e74c3c; }

.aidb-ac-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.aidb-ac-persona-emoji {
    font-size: 1.3em;
    line-height: 1;
}

.aidb-ac-persona-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95em;
}

.aidb-ac-persona-expertise {
    font-size: 0.8em;
    color: #a0aec0;
    margin-left: 4px;
}

.aidb-ac-message-content {
    font-size: 0.95em;
    line-height: 1.75;
    color: #4a5568;
}

.aidb-ac-message-content p {
    margin: 0 0 8px;
}

.aidb-ac-message-content p:last-child {
    margin-bottom: 0;
}

/* --- 引用リンク --- */

.aidb-ac-citation-link {
    display: inline;
    color: #2b6cb0;
    text-decoration: none;
    border-bottom: 1px dashed #2b6cb0;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
}

.aidb-ac-citation-link:hover {
    color: #1a365d;
    border-bottom-style: solid;
}

/* --- プレミアムゲート --- */

.aidb-ac-locked .aidb-ac-message-content {
    position: relative;
}

.aidb-ac-blur-content {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.aidb-ac-gate {
    margin-top: 24px;
    text-align: center;
}

.aidb-ac-gate-inner {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #fff;
    padding: 32px;
    border-radius: 10px;
}

.aidb-ac-gate-text {
    font-size: 1.1em;
    margin: 0 0 16px;
    font-weight: 600;
}

.aidb-ac-gate-cta {
    display: inline-block;
    background: #f6ad55;
    color: #1a202c;
    padding: 12px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    transition: background 0.2s;
}

.aidb-ac-gate-cta:hover {
    background: #ed8936;
    color: #1a202c;
}

.aidb-ac-gate-note {
    margin-top: 12px;
    font-size: 0.85em;
    color: #a0aec0;
}

/* --- フィードページ --- */

.aidb-ac-feed {
    max-width: 800px;
    margin: 0 auto;
}

.aidb-ac-feed-header {
    margin-bottom: 32px;
    text-align: center;
}

.aidb-ac-feed-title {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 8px;
}

.aidb-ac-feed-subtitle {
    font-size: 0.95em;
    color: #718096;
    margin: 0;
}

.aidb-ac-feed-date {
    font-size: 0.85em;
    font-weight: 600;
    color: #a0aec0;
    padding: 12px 0 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-top: 24px;
}

.aidb-ac-feed-item {
    padding: 20px 0;
    border-bottom: 1px solid #edf2f7;
}

.aidb-ac-feed-item-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.aidb-ac-feed-item-personas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.aidb-ac-feed-persona {
    font-size: 0.85em;
    color: #4a5568;
}

.aidb-ac-feed-item-seed {
    font-size: 0.85em;
    color: #718096;
    margin-bottom: 8px;
}

.aidb-ac-feed-item-seed a {
    color: #2b6cb0;
    text-decoration: none;
}

.aidb-ac-feed-item-meta {
    font-size: 0.8em;
    color: #a0aec0;
    margin-bottom: 8px;
}

.aidb-ac-feed-item-link {
    font-size: 0.9em;
    color: #2b6cb0;
    text-decoration: none;
    font-weight: 600;
}

.aidb-ac-feed-item-link:hover {
    text-decoration: underline;
}

.aidb-ac-feed-empty {
    text-align: center;
    color: #a0aec0;
    padding: 48px 0;
}

/* --- レスポンシブ --- */

@media (max-width: 768px) {
    .aidb-ac-section {
        padding: 20px 16px;
        margin-top: 32px;
    }

    .aidb-ac-message {
        padding: 16px;
    }

    .aidb-ac-persona-expertise {
        display: none;
    }

    .aidb-ac-gate-inner {
        padding: 24px 16px;
    }

    .aidb-ac-lang-switcher {
        flex-wrap: wrap;
    }
}
