@charset "UTF-8";
/**
 * VT Timeline — Instagram 埋め込み / AIアシスト
 *
 * 【高さ切れの対策】
 *   page.css に `.time-line-content iframe { height: 400px; }` があり、
 *   Instagram の iframe まで 400px に固定されて動画が見切れていた。
 *   本文ラッパーを .vt-tl-body に変えたため、そのルールはもう当たらない。
 *   さらに保険として、embed.js が投げてくる MEASURE メッセージを
 *   js/vt-instagram.js 側でも受け取り、高さを !important で反映する。
 *
 * @package vt-renewal
 */

/* ==================================================================
 * 埋め込み
 * ================================================================== */
.time-line-instagram {
    margin: 14px 0 0;
    display: flex;
    justify-content: center;
}

.time-line-instagram .instagram-media {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 540px !important;
    min-width: 0 !important;
    background: #fff;
    border: 1px solid #e3e8ed !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 0;
}

/* 変換後の iframe が親テーマの固定高さに巻き込まれないようにする。
   実際の高さは embed.js（と保険のJS）がインラインで設定する。 */
.time-line-instagram iframe.instagram-media {
    display: block;
    min-height: 540px;
}

/* 変換前のプレースホルダ。CLS を抑える */
.time-line-instagram blockquote.instagram-media {
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(
            -45deg,
            #f7f9fa 0 12px,
            #f2f5f8 12px 24px
        );
}

.time-line-instagram blockquote.instagram-media a {
    font-size: 1.3rem;
    font-weight: 700;
    color: #5b6b7c;
    text-decoration: none;
}

@media screen and (max-width: 899px) {
    .time-line-instagram blockquote.instagram-media { min-height: 540px; }
    .time-line-instagram iframe.instagram-media { min-height: 460px; }
}

/* ==================================================================
 * AI アシストの結果
 * ================================================================== */
.ig-assist-status {
    font-size: 1.2rem;
    color: #5b6b7c;
    line-height: 1.6;
}

.ig-assist-status.is-busy::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 2px solid #dfe6ee;
    border-top-color: #004096;
    border-radius: 50%;
    vertical-align: -2px;
    animation: ig-spin .8s linear infinite;
}

@keyframes ig-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .ig-assist-status.is-busy::before { animation: none; }
}

.ig-assist-result:empty { display: none; }

.ig-assist-result {
    margin: 12px 0 0;
    padding: 14px;
    background: #f5f7fa;
    border: 1px solid #e3e8ed;
    border-radius: 12px;
}

.ig-warn {
    margin: 0 0 10px;
    padding: 9px 11px;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #8a5300;
    background: #fff6e5;
    border-left: 3px solid #e0a338;
    border-radius: 0 6px 6px 0;
}

.ig-meta {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.7;
    color: #004096;
}

.ig-cand {
    margin-bottom: 10px;
    padding: 13px 15px;
    background: #fff;
    border: 1px solid #e3e8ed;
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.ig-cand.is-used {
    border-color: #004096;
    box-shadow: 0 0 0 3px #eaf1fb;
}

.ig-cand-head {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #004096;
    background: #eaf1fb;
    border-radius: 999px;
}

.ig-cand-body {
    font-size: 1.4rem;
    line-height: 1.95;
    color: #16202a;
    white-space: pre-wrap;
}

.ig-cand-use {
    margin-top: 10px;
    padding: 7px 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #004096;
    background: #fff;
    border: 1px solid #004096;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.ig-cand-use:hover { background: #004096; color: #fff; }

.ig-telop { margin-top: 10px; font-size: 1.2rem; }

.ig-telop summary {
    cursor: pointer;
    font-weight: 700;
    color: #004096;
}

.ig-telop pre {
    margin-top: 8px;
    padding: 11px;
    max-height: 260px;
    overflow: auto;
    font-size: 1.15rem;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
    background: #fff;
    border: 1px solid #e3e8ed;
    border-radius: 8px;
}
