/* ─────────────────────────────────────────────
   ティッカー（スライドプッシュ型）
───────────────────────────────────────────── */

/*
 * WordPress の is-layout-constrained / has-global-padding などが
 * display:flex や height を上書きするため、詳細度を上げて対処する。
 * ※ max-width / margin は打ち消さない（幅はテーマのレイアウトに従う）
 *
 * 高さは JS が --wpp-ticker-height カスタムプロパティで上書きする。
 * デフォルト値は 44px。
 */
.wpp-ticker-wrapper,
.wp-block-query.wpp-ticker-wrapper {
    --wpp-ticker-height: 44px;

    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    overflow: hidden !important;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    height: var(--wpp-ticker-height) !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

/*
 * is-layout-constrained の子要素への margin-auto を打ち消す。
 */
.wpp-ticker-wrapper > ul,
.wpp-ticker-wrapper > .wp-block-post-template {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* ラベル（JS が DOM に挿入） */
.wpp-ticker-label {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: #fff;
    padding: 0 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    z-index: 2;
    box-sizing: border-box;
    height: var(--wpp-ticker-height);
    line-height: var(--wpp-ticker-height);
}

/* スクロールビューポート */
.wpp-ticker-viewport {
    position: relative !important;
    flex: 1 1 0% !important;
    overflow: hidden !important;
    height: var(--wpp-ticker-height) !important;
    min-width: 0;
    margin-block: 0 !important;
}

/* 各スライドアイテム */
.wpp-ticker-slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--wpp-ticker-height) !important;
    box-sizing: border-box;
    padding: 0 16px;
    display: flex !important;
    align-items: center;
}

/* タイトル */
.wpp-ticker-title {
    margin: 0 !important;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.wpp-ticker-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpp-ticker-title a:hover {
    color: #0073aa;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .wpp-ticker-label {
        padding: 0 12px;
        font-size: 12px;
    }
    .wpp-ticker-slide {
        padding: 0 10px;
    }
    .wpp-ticker-title {
        font-size: 13px;
    }
}