@charset "UTF-8";

.bousai-widget {
    max-width: 800px;
    margin: 0 auto;
/*    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;*/
    color: #333333;
    line-height: 1.6;
}

.bousai-widget h2 {
    font-size: 0.9rem;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: #0056b3;
}

.bousai-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bousai-list li {
    padding-bottom: 0;
}
.bousai-item {
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.bousai-item:hover {
    background-color: #f8fafc;
}

/* スマホ時（デフォルト）：日時が上、タイトルが下 */
.bousai-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem 0;
}

.bousai-date {
    font-size: 0.85rem;
    color: #555555;
    font-weight: 500;
    order: 1; /* スマホ時は上 */
/*    margin-bottom: 0.25rem;*/
}

.bousai-title {
    font-size: 0.9rem;
    order: 2; /* スマホ時は下 */
    width: 100%; /* ← 【追加】スマホ時にタイトル領域を100%に広げる */
}

/* タイトル内のリンク装飾 */
body#template li a.bousai-link {
    display: block; 
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
}

.bousai-link:hover {
    /* 必要に応じて */
}

.bousai-message {
    padding: 1rem;
    text-align: center;
    color: #666666;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.bousai-error {
    color: #b91c1c;
    background-color: #fef2f2;
    border-color: #fecaca;
}

/* 画面幅が広い場合（PC等：日時が左、タイトルが右で横並び） */
@media (min-width: 768px) {
    #bousai-container {
        padding-top: .5em;
	margin-bottom: 2em;
    }
    .bousai-header {
        flex-direction: row;
        align-items: flex-start; /* PC時も上揃えにする場合はここを flex-start に */
        gap: 1.5rem;
        padding: .5em 0 0;
    }
    .bousai-date {
        order: 1; /* 左側 */
        margin-bottom: 0;
        flex-shrink: 0;
        min-width: 100px;
    }
    .bousai-title {
        order: 2; /* 右側 */
        flex-grow: 1; /* ← 【推奨】PC時は残りの幅いっぱいに広げる */
        width: auto;  /* ← スマホ用の 100% をリセット */
    }
    body#template li a.bousai-link {
        width: auto; /* ← PC時は必要に応じて自動幅に戻すか、お好みで調整 */
    }
}