/**
 * mls_widget.css — ウィジェットブロック専用スタイル
 * 対応: blog_whatsnew, youtube, twitter, instagram, iframe
 */

/* ---- 共通 ---- */
.mls-widget-placeholder,
.mls-widget-error,
.mls-widget-empty {
    padding: 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.mls-widget-error {
    color: #c33;
    border-color: #e8c0c0;
    background: #fff5f5;
}

/* ============================================
   blog_whatsnew — ブログ新着情報（chuken風デザイン）
   ============================================ */
.mls-widget-whatsnew {
    padding: 0;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    border-left: none;
}

/* ---- タイトル（中央揃え・下線付き） ---- */
.mls-widget-whatsnew-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1.2rem 0;
    padding-bottom: 0.8rem;
    text-align: center;
    letter-spacing: 0.1em;
    border-bottom: 2px solid #8b3a3a;
}

/* ---- 記事リスト ---- */
.mls-widget-whatsnew-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mls-widget-whatsnew-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.mls-widget-whatsnew-item:last-child {
    border-bottom: none;
}

.mls-widget-whatsnew-item:hover {
    background: #faf8f8;
}

/* ---- 日付 ---- */
.mls-widget-whatsnew-date {
    color: #888;
    font-size: 0.8rem;
    flex-shrink: 0;
    min-width: 5.5em;
    font-variant-numeric: tabular-nums;
    padding-top: 1px;
}

/* ---- カテゴリバッジ ---- */
.mls-widget-whatsnew-cat {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    min-width: 4.5em;
    text-align: center;
}

.mls-widget-whatsnew-cat.cat-notice {
    background: #8b3a3a;
    color: #fff;
}
.mls-widget-whatsnew-cat.cat-event {
    background: #3a5a8b;
    color: #fff;
}
.mls-widget-whatsnew-cat.cat-info {
    background: #3a7a5a;
    color: #fff;
}

/* ---- タイトルリンク ---- */
.mls-widget-whatsnew-link {
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    line-height: 1.4;
}

.mls-widget-whatsnew-link:hover {
    color: #8b3a3a;
}

/* ---- 一覧ボタン ---- */
.mls-widget-whatsnew-more {
    margin-top: 1.5rem;
    text-align: center;
}

.mls-widget-whatsnew-more a {
    display: inline-block;
    padding: 0.6rem 2.5rem;
    color: #8b3a3a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #8b3a3a;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.05em;
}

.mls-widget-whatsnew-more a:hover {
    background: #8b3a3a;
    color: #fff;
}

/* ============================================
   youtube — YouTube 埋め込み
   ============================================ */
.mls-widget-youtube {
    margin: 0.5rem auto;
}

.mls-widget-youtube-wrap {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ============================================
   twitter — X (Twitter) 埋め込み
   ============================================ */
.mls-widget-twitter {
    margin: 0.5rem auto;
}

.mls-widget-twitter blockquote {
    margin: 0 !important;
}

/* ============================================
   instagram — Instagram 埋め込み
   ============================================ */
.mls-widget-instagram {
    margin: 0.5rem auto;
}

/* ============================================
   iframe — 汎用 iframe 埋め込み
   ============================================ */
.mls-widget-iframe {
    margin: 0.5rem auto;
}

.mls-widget-iframe iframe {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ============================================
   ウィジェット編集パネル
   ============================================ */
.mls-widget-panel {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 767px) {
    .mls-widget-whatsnew-item {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .mls-widget-whatsnew-link {
        white-space: normal;
        flex-basis: 100%;
    }
}
