@charset "utf-8";

/*
 * 画面の見た目の整理（common.css のあとに読み込む。common.css は変えない）
 *   1. 文字の大きさ        … 全体を大きく
 *   2. フォーム部品の統一  … 入力欄・選択欄・ファイル選択・ボタン・チェックを、同じ高さ・同じ角・同じ色に
 *   3. 表・メニュー・メッセージの余白
 * 色は、今までの紺（#1C4086）と水色の方針のまま。
 */

/*=========================
　1. 文字の大きさ
=========================*/
:root {
  --fontsize_l : 20px;   /* 大きな見出し・件数 */
  --fontsize_m : 16px;   /* 本文・入力欄・ボタン */
  --fontsize_s : 14px;   /* 補足・ヘッダー */
  --fontsize_ss: 14px;   /* 表の見出し・フッター（以前は未定義で、まちまちの大きさだった） */

  --navy       : #1C4086;
  --navy-dark  : #14306a;
  --navy-soft  : #eef3fb;
  --line       : #99BBE8;
  --ctl-border : #8aa0c8;
  --ctl-h      : 40px;
  --radius     : 6px;
  --focus      : #2f6fe0;
  --danger     : #c62828;
}

body, table, td { font-size: var(--fontsize_m); }
body { line-height: 1.5; }

/*=========================
　2. フォーム部品の統一
=========================*/

/* ---- 文字を入れる欄・選ぶ欄：同じ高さ・同じ枠 ---- */
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  box-sizing  : border-box;
  height      : var(--ctl-h);
  padding     : 0 12px;
  font-family : inherit;
  font-size   : var(--fontsize_m);
  line-height : normal;
  color       : #222;
  background  : #fff;
  border      : 1px solid var(--ctl-border);
  border-radius: var(--radius);
}
textarea { height: auto; padding: 10px 12px; }

select {
  padding-right: 38px;
  cursor       : pointer;
  appearance   : none;
  -webkit-appearance: none;
  background   : #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%231C4086' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 15px auto;
}
select:disabled { background-color: #eef0f4; color: #777; cursor: not-allowed; }

input:not([type]):focus, input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, input[type=email]:focus,
select:focus, textarea:focus {
  outline     : 3px solid rgba(47, 111, 224, .30);
  outline-offset: 0;
  border-color: var(--focus);
}
::placeholder { color: #9aa6bd; }

/* ---- ファイル選択：中のボタンも、他のボタンと同じ見た目に ---- */
input[type=file] {
  width      : 420px;           /* 中の文字が途中で切れないように、はっきり幅を決める */
  max-width  : 100%;
  font-family: inherit;
  font-size  : var(--fontsize_s);
  color      : #444;
}
input[type=file]::file-selector-button {
  height      : var(--ctl-h);
  margin-right: 12px;
  padding     : 0 20px;
  font-family : inherit;
  font-size   : var(--fontsize_m);
  font-weight : bold;
  color       : var(--navy);
  background  : #fff;
  border      : 1px solid var(--navy);
  border-radius: var(--radius);
  cursor      : pointer;
}
input[type=file]::file-selector-button:hover { background: var(--navy-soft); }

/* ---- ボタン：決定（紺）／ふつう（白）／危険（赤） ---- */
input[type=submit], input[type=button], button, .btn {
  box-sizing  : border-box;
  min-height  : var(--ctl-h);
  padding     : 0 26px;
  font-family : inherit;
  font-size   : var(--fontsize_m);
  font-weight : bold;
  line-height : 1.2;
  color       : var(--navy);
  background  : #fff;
  border      : 1px solid var(--navy);
  border-radius: var(--radius);
  cursor      : pointer;
}
input[type=button]:hover, button:hover, .btn:hover { background: var(--navy-soft); }
input[type=submit] { color: #fff; background: var(--navy); }
input[type=submit]:hover { background: var(--navy-dark); }
input[type=submit]:focus-visible, input[type=button]:focus-visible, button:focus-visible {
  outline: 3px solid rgba(47, 111, 224, .35); outline-offset: 2px;
}
input[type=submit]:disabled, input[type=button]:disabled, button:disabled { opacity: .55; cursor: not-allowed; }
input[type=image] { vertical-align: middle; cursor: pointer; }

/* 書出し：取り返しがつかない操作は赤 */
#container_export #btn_export {
  min-height  : 50px;
  padding     : 0 36px;
  font-size   : var(--fontsize_l);
  color       : #fff;
  background  : var(--danger);
  border      : 1px solid #8e1b1b;
  border-radius: var(--radius);
}
#container_export #btn_export:hover { background: #a31f1f; }

/* ---- チェック・ラジオ ---- */
input[type=checkbox], input[type=radio] {
  width         : 22px;
  height        : 22px;
  margin        : 0 6px 0 0;
  vertical-align: middle;
  accent-color  : var(--navy);
  cursor        : pointer;
}
input[type=checkbox]:disabled { cursor: not-allowed; }
label { cursor: pointer; }

/*=========================
　フォームの表（入力欄が縦に並ぶ画面）
　　<table class="list form"> …（登録・編集・ユーザ・ログイン）
=========================*/
table.list.form { border-color: #c9d6ea; }
table.list.form th {
  width       : 11em;
  padding     : 14px 18px;
  text-align  : left;
  font-size   : var(--fontsize_m);
  font-weight : bold;
  line-height : 1.4;
  color       : var(--navy);
  background  : var(--navy-soft);
  border      : 1px solid #c9d6ea;
}
table.list.form td {
  padding     : 12px 18px;
  line-height : 1.4;
  border      : 1px solid #c9d6ea;
  background  : #fff;
}
table.list.form td input[type=text],
table.list.form td input[type=password],
table.list.form td input[type=number] { width: 100%; max-width: 520px; }
table.list.form td select { min-width: 12em; }
table.narrow { max-width: 640px; margin: 28px auto; }

/* 横に並べる行（届出日の年月日＋ボタン、ファイル＋タイトル） */
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.field-row .sep { color: #8a96ad; margin: 0 4px; }
/* 年・月・日は短く（表の中の選択欄の最小幅より、強く指定する）。日付ボタンは次の行に並べる */
table.list.form .field-row select { min-width: 0; }
table.list.form .field-row select[id$="_yy"] { width: 118px; }
table.list.form .field-row select[id$="_mm"], table.list.form .field-row select[id$="_dd"] { width: 106px; }
.field-row .sep { display: none; }
.field-row .quick-btns { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.date-btn { min-height: 36px; padding: 0 12px; font-size: var(--fontsize_s); font-weight: normal; }

.filerow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.filerow input[type=file] { flex: 0 1 420px; }
.titlefield { display: flex; align-items: center; gap: 10px; flex: 1 1 360px; font-weight: bold; color: var(--navy); cursor: default; }
.titlefield span { white-space: nowrap; }
.titlefield input[type=text] { flex: 1 1 auto; width: auto; max-width: none; }

p.formbtn { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 26px 0 8px; }

/*=========================
　3. 表・メニュー・メッセージ
=========================*/
table.list th {
  padding    : 9px 12px;
  font-size  : var(--fontsize_ss);
  line-height: 1.4;
}
table.list td {
  padding    : 8px 12px;
  line-height: 1.4;
}
table.list td select { height: 40px; min-width: 7em; }
table.list tr:not(.active_):hover td { background-color: rgba(28, 64, 134, .06); }
.icon { width: auto; height: auto; }

/* 一覧の列：数字・日付が詰まらないように */
table.list td.ac, table.list .ac { text-align: center; }

#contents h1 { font-size: var(--fontsize_s); margin-bottom: 12px; }
/* 見出しの帯（背景画像の高さ 35px に、文字が収まるように） */
#contents h2 {
  font-size  : 18px;
  padding    : 0 14px;
  height     : 35px;
  line-height: 33px;
  margin-bottom: 12px;
  overflow   : hidden;
}
.hitMsg { margin: 14px 0 10px; }
.sm, .ex { font-size: var(--fontsize_s); }

/* メッセージ */
#msg_good, .msg_regist { font-size: var(--fontsize_m); padding: 12px; color: #1a56c8; }
.err { font-size: var(--fontsize_s); padding-left: 16px; background-position: left center; }
ul.emsg { font-size: var(--fontsize_m); font-weight: bold; line-height: 1.6; margin: 12px 0; padding-left: 22px; }
.nodata { font-size: var(--fontsize_m); padding: 40px 0; }

/* 凡例（放送中・確認済など）：浮かせた並びが、次の見出しに重ならないように */
ul.fuki { overflow: hidden; margin-bottom: 18px; font-size: var(--fontsize_s); }
ul.fuki li { margin: 10px 18px 0 0; }
ul.fuki li img { width: 26px; height: 16px; }

/* ページ送り */
table.pgnavi td { padding: 22px; }
table.pgnavi a, table.pgnavi span {
  display    : inline-block;
  padding    : 8px 14px;
  margin     : 3px;
  font-size  : var(--fontsize_s);
  line-height: 1.2;
  border-radius: 4px;
}

/* 放送確認の小さな画像 */
.gazometa { font-size: 14px; line-height: 1.3; }

/* 書出し画面 */
#container_export select { height: 50px; padding: 0 40px 0 16px; font-size: var(--fontsize_m); min-width: 10em; }
#container_export .code { font-size: 30px; letter-spacing: .15em; font-weight: bold; color: #333; }
#timeinfo { font-size: var(--fontsize_m); }

/* ---- ヘッダー・メニュー ---- */
table#header td { font-size: var(--fontsize_s); }
/* 左右のすき間を同じにする：ページの左端〜メニュー、メニュー〜本文、本文〜ページの右端、すべて 8px */
table#body { border-spacing: 8px; }
table#body td#menu { width: 177px; }
/* スクロールしても、メニューが画面の上に付いてくる（旧：ヘッダーの 40px 下に固定していたのを、本文と同じ高さから始まる追従に変えた。ヘッダーの高さが変わっても重ならない） */
#menu #accordion { position: sticky; top: 8px; width: auto; }
/* 左上のロゴ（元の画像は幅150px）：メニューの幅いっぱいに合わせる */
#accordion > div:first-child a { display: block; line-height: 0; }
#accordion > div:first-child img { display: block; width: 100%; height: auto; }
#accordion .menuheader { padding: 7px 10px 6px; font-size: 15px; cursor: default; }
/* 「画像テロップ」「ユーザ管理」は、マウスを乗せても色を変えない（common.css の赤＆黄色の切り替えを止める） */
#accordion .menuheader:hover { color: #FFF; background-color: #1C4086; }
#accordion div.categorylinks a, #accordion div.categorylinks2 a { padding: 5px 6px 4px 18px; font-size: 15px; }
#accordion div.categorylinks3 { padding: 7px 8px 5px; font-size: 15px; }
#accordion div.categorylinks2_selected { padding: 5px 6px 4px 18px; font-size: 15px; }
#accordion div.selected { padding: 7px 8px 5px; font-size: 15px; }

/*=========================
　部品（新システムで追加）
=========================*/
/* 画像タイトルにマウスを乗せたときのプレビュー（common.css の #preview を、位置固定・マウスを邪魔しない形に） */
#preview {
  position      : fixed;
  z-index       : 900;
  display       : none;
  box-sizing    : content-box;
  padding       : 5px;
  background    : #333;
  border        : 2px solid #1c1c1c;
  box-shadow    : 0 6px 24px rgba(0, 0, 0, .35);
  pointer-events: none;        /* プレビューの上にカーソルが来ても、乗せている状態が途切れない */
}
#preview img { display: block; width: 100%; height: auto; margin: 0; background: #111; }
#preview .cap { margin-top: 5px; padding: 0 2px; font-size: 14px; line-height: 1.3; color: #fff; word-break: break-all; }

.lb-overlay {
  position  : fixed;
  inset     : 0;
  z-index   : 1000;
  display   : flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .8);
  cursor    : pointer;
}
.lb-overlay img { max-width: 92vw; max-height: 92vh; box-shadow: 0 0 20px #000; }

#actionMsg { display: none; }
.errbox { display: none; flex-basis: 100%; }

/*=========================
　画面上部（ヘッダー）
　　・絵は、帯の上下中央
　　・「テレマガシステム」と、右上の「ログインID | ログアウト」は、絵の下辺に文字の下辺を揃える
　　　（微調整の数値は、実際の画素を測って決めた）
=========================*/
table#header { height: 44px; background-size: auto 100%; }   /* 帯の背景を、44px いっぱいに伸ばす */
table#header td { vertical-align: middle; }
table#header a.brand { display: flex; width: fit-content; align-items: flex-end; gap: 5px; color: #fff; text-decoration: none; }
table#header .brand-icon { display: block; width: auto; height: 22px; }   /* 見えている白いテレビの形ぴったり（brand-icon.svg）の高さ */
table#header .brand-app { font-size: var(--fontsize_m); font-weight: bold; letter-spacing: .04em; line-height: 1; white-space: nowrap; transform: translateY(var(--brand-text-shift, 2px)); }
table#header td#loginStatus { vertical-align: bottom; padding-bottom: var(--status-pad, 9.25px); line-height: 1; white-space: nowrap; }
table#header td#loginStatus .who { font-weight: bold; }
