/***************************************/
 body {
    text-align: center; /* 全体を中央揃え */
    background-color: #f8f8f8;
}
/***************************************/
 .button-block {
    position: sticky;
    display: flex;
    align-items: center; /* 垂直方向の中央揃え */
    gap: 15px;
    margin-top: calc(0% + 1em);
    margin-left: 0; /* 右寄せを防ぐため削除 */
    padding: 0 1em; /* 左右の余白を少し確保 */
    background-color: #f8f8f8;
    justify-content: flex-start; /* 左詰め */
    width: 100%; /* 横幅を100%に */
}

.detail-content {
    font-size: 1.8vw;  /* 画面幅に応じたサイズ */
    font-weight: bold;
    color: #333;
    flex-grow: 1; /* ボタンブロックの左側を占有 */
    text-align: left; /* 左寄せ */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/***************************************
 ***************************************/
 .button-container3 {
    display: flex;
    flex-direction: column; /* 縦方向に配置 */
    align-items: center; /* 縦の位置を揃える */
    gap: 10px; /* 上下の間隔を小さく */
    margin: 20px auto 0 auto; /* 上に20pxのマージンを追加して下に移動 */
}
.button-container3 button:hover {
    opacity: 0.85;
}

.button-container2 {
    display: flex;
    justify-content: center; /* ボタンを中央揃え */
    gap: 40px; /* ボタン間の間隔を調整 */
}
.button-container2 div {
    margin-bottom: 0; /* 余計なマージンを削除 */
}


.button-container2 button {
    width: 25vw;
    height: 22vh;
    min-width: 150px;  /* 最小幅を確保 */
    min-height: 60px;  /* 最小高さを確保 */
    padding: 5px;
    color: rgb(19,55, 141);
    text-align: center;
    box-sizing: border-box;
    font-weight: bold;
    font-size: clamp(12px, 4vw, 4vh);
    border-radius: 8px; /* 角を少し丸める */
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease-in-out;
    margin-bottom: 10px; /* ボタンの下の間隔を少し縮める */
}
.button-container2 button:hover {
    color: white !important;
    background-color: #0056b3;
/*    opacity: 0.70;*/
}

.button-container2 .menuButtonStyle {
    font-weight: bold;
    font-size: clamp(12px, 2vw, 2vh);
}

.dummyStyle {
    visibility: hidden;
}
/* 要素を完全にレイアウトから除去するなら display:none を使う */
.hidden {
  display: none;
}
/* visibility:hidden でも良いですが、要素の領域は残る */
.invisible {
  visibility: hidden;
}
/***************************************
 ***************************************/
 .button-container5 {
    display: flex;
    flex-direction: column; /* 縦方向に配置 */
    align-items: center; /* 縦の位置を揃える */
    gap: 10px; /* 上下の間隔を小さく */
    margin: 20px auto 0 auto; /* 上に20pxのマージンを追加して下に移動 */
}
.button-container5 button:hover {
    opacity: 0.85;
}

.button-container4 {
    display: flex;
    justify-content: center; /* ボタンを中央揃え */
    gap: 40px; /* ボタン間の間隔を調整 */
}
.button-container4 div {
    margin-bottom: 0; /* 余計なマージンを削除 */
}


.button-container4 button {
    width: 25vw;
    height: 10vh;
    min-width: 150px;  /* 最小幅を確保 */
    min-height: 60px;  /* 最小高さを確保 */
    padding: 5px;
    color: rgb(19,55, 141);
    text-align: center;
    box-sizing: border-box;
    font-weight: bold;
    font-size: clamp(12px, 2.5vw, 2.5vh);
    border-radius: 8px; /* 角を少し丸める */
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease-in-out;
    margin-bottom: 10px; /* ボタンの下の間隔を少し縮める */
}
.button-container4 button:hover {
    color: white !important;
    background-color: #0056b3;
/*    opacity: 0.70;*/
}


/*===================================*/
/*　以下　お知らせと履歴               */
/*===================================*/
/* ▼ 全体2カラムレイアウト */
.announcement-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin: 30px auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* ▼ 左側：お知らせ入力 */
.announcement-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ▼ 共通ヘッダー */
.announcement-header {
    font-size: 1.2em;
    font-weight: bold;
    background-color: #e5f1fb;
    padding: 8px 12px;
    border-radius: 6px;
    color: #003366;
    text-align: left;
}

/* ▼ レベル選択 */
.level-selector {
    display: flex;
    gap: 12px;
}
.level-selector input[type="radio"] {
    display: none;
}
.level-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease-in-out;
    opacity: 0.7;
    border: 2px solid transparent;
}
.level-button:hover {
    opacity: 0.9;
    transform: scale(1.03);
}
/* ▼ 各色 */
.level-critical  { background-color: #d9534f; }
.level-info      { background-color: #5cb85c; }
.level-warning   { background-color: #0275d8; }

/* ラジオが選択された状態の見せ方 */
/* ▼ 選択されたボタンの強調表現 */
.level-selector input[type="radio"]:checked + .level-button {
    opacity: 1.0;
    border: 2px solid #000;
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* ▼ タイトルと本文 */
.announcement-title,
.announcement-content {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    min-height: 2.4em;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-wrap: break-word;
    outline: none;
}
/* ▼ ① タイトル：上下中央・左詰め */
.announcement-title {
    font-weight: bold;
    height: 2.5em;
    display: flex;
    align-items: center;      /* 縦方向中央揃え */
    justify-content: flex-start; /* 左詰め */
    text-align: left;
}
/* ▼ ② 本文：上詰め・左詰め */
.announcement-content {
    min-height: 280px; /* 本文エリアをやや広めに */
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.announcement-title {
    font-weight: bold;
    height: 2.5em;
}
.announcement-content {
    min-height: 200px;
}

/* ▼ 送信ボタン */
#sendAnnouncement {
    align-self: flex-end;
    padding: 8px 16px;
    font-weight: bold;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
#sendAnnouncement:hover {
    background-color: #003d80;
}

/* ▼ 右側：履歴一覧 */
.announcement-history {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.announcement-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ▼ 履歴リスト */
.announcement-list {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fafafa;
    height: 320px;
    overflow-y: auto;
    padding: 8px;
}
/* ▼ 履歴行のスタイル */
.announcement-row {
    display: grid;
    grid-template-columns: 90px 130px 1fr; /* レベル / 日時 / タイトル */
    align-items: center;
    gap: 15px;
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-family: "メイリオ", sans-serif;
}
.announcement-row:hover {
    background-color: #e0f0ff;
}
.announcement-row.selected {
    background-color: #cce5ff;
}
.announcement-level-label {
    display: inline-block;
    width: 72px; /* 「お知らせ」固定幅（全角4字） */
    text-align: center;
    font-size: 0.85em;
    padding: 3px 6px;
    border-radius: 4px;
    color: white;
}
.announcement-row span:nth-child(2) {
    white-space: nowrap; /* 日付＋時間を1行に */
}

.announcement-row span:nth-child(3) {
    text-align: left;     /* タイトル左詰め */
}
.level-critical-label { background-color: #d9534f; }
.level-info-label    { background-color: #5cb85c; }
.level-warning-label { background-color: #0275d8; }

/* ▼ contenteditable プレースホルダ風ガイド */
.announcement-title:empty::before,
.announcement-content:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
    font-style: italic;
}

/* 入力中の見た目（念のため） */
.announcement-title,
.announcement-content {
    position: relative;
}




/* ▼ 履歴操作ボタン */
#refreshHistory, #deleteSelected {
    padding: 6px 12px;
    margin-left: 5px;
    font-weight: bold;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#refreshHistory:hover, #deleteSelected:hover {
    background-color: #5a6268;
}


/* =========================================== */
/* =========================================== */
    .button-container5 {
      max-width: 800px;
      margin: 20px auto;
      font-family: sans-serif;
    }
    /* 上部：事業体コード入力 */
    .code-fetch {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 16px;   /* 下に余白 */
    }
    .code-fetch label {
      white-space: nowrap;
    }
    .code-fetch input {
      width: 80px;
      padding: 4px;
    }
    .code-fetch button {
        padding: 4px 12px;
    }

    /* 下部：左右フォームを横並び */
    .form-container {
      display: flex;
      gap: 16px;
      margin-top: 16px;
    }
    .form-section {
      flex: 1;
      border: 1px solid #666;
      padding: 12px;
      box-sizing: border-box;
    }
    .form-section table {
      width: 100%;
      border-collapse: collapse;
    }
    .form-section th {
      text-align: left;
      padding: 6px 8px;
      vertical-align: middle;
      white-space: nowrap;
    }
    .form-section td {
      padding: 6px 8px;
    }
    .form-section input,
    .form-section select {
      width: 100%;
      padding: 4px;
      box-sizing: border-box;
    }
    .form-section button {
      display: block;
      margin: 12px auto 0;
      padding: 6px 16px;
    }
/* =========================================== */
/* =========================================== */
 .button-container7 {
    display: flex;
    flex-direction: column; /* 縦方向に配置 */
    align-items: center; /* 縦の位置を揃える */
    gap: 10px; /* 上下の間隔を小さく */
    margin: 20px auto 0 auto; /* 上に20pxのマージンを追加して下に移動 */
}
.button-container7 button:hover {
    opacity: 0.85;
}

.button-container6 {
    display: flex;
    justify-content: center; /* ボタンを中央揃え */
    gap: 40px; /* ボタン間の間隔を調整 */
}
.button-container6 div {
    margin-bottom: 0; /* 余計なマージンを削除 */
}


.button-container6 button {
    width: 25vw;
    height: 10vh;
    min-width: 150px;  /* 最小幅を確保 */
    min-height: 60px;  /* 最小高さを確保 */
    padding: 5px;
    color: rgb(19,55, 141);
    text-align: center;
    box-sizing: border-box;
    font-weight: bold;
    font-size: clamp(12px, 2.5vw, 2.5vh);
    border-radius: 8px; /* 角を少し丸める */
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease-in-out;
    margin-bottom: 10px; /* ボタンの下の間隔を少し縮める */
}
.button-container6 button:hover {
    color: white !important;
    background-color: #0056b3;
/*    opacity: 0.70;*/
}

/* =========================================== */
/* ボタン下の版数情報 */
.version-info {
    margin-top: 0px;
    font-size: 1.5rem;
    color:black;
    position: relative;
    z-index: 999999 !important;
    pointer-events: none;
    text-align: right;  /* 中央寄せしたい場合 */
}




