/* Display URL of hyperlinks when printing */
@media print {
  a:after {
    content: " (" attr(href) ")";
  }
}

/* Example media query expression for Responsive Web Design */
@media (orientation: portrait) and (min-width:980px) {
  html {
    display: none;
  }
}

body, td, th, input, textarea, select {
    margin: 0;
    font-family: "游ゴシック体", "Yu Gothic", YuGothic, "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", "Meiryo", sans-serif;

    height: 26px;
    vertical-align: middle;
    box-sizing: border-box;
}

.card button, .card input[type="date"], .card select {
    height: 26px;
    padding: 0 4px;
    line-height: 26px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.card button {
    background-color: #f8f9fa;
    cursor: pointer;
    white-space: nowrap;
}

.card button:hover {
    background-color: #f1f3f4;
}

.card button:active {
    background-color: #e0e0e0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card input[type="date"]:invalid {
    border-color: #c5221f;
}

div.card {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin: 5px;
    padding: 5px;
}

div.card span {
  padding: 5px;
}

.auth-status {
    display: inline-block;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-left: 4px;
    padding: 4px 8px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;

    height: 20px;
    line-height: 20px;
    padding: 0 8px;
}

/* エリアの絞り込みトグル。押下中(aria-pressed=true)は config の areas だけを選択肢に出す */
.card button.area-filter {
    border-radius: 13px;
    padding: 0 10px;
    color: #5f6368;
}

.card button.area-filter[aria-pressed="true"] {
    background-color: #e8f0fe;
    border-color: #174ea6;
    color: #174ea6;
    font-weight: 700;
}

.card button.area-filter:disabled {
    cursor: default;
    opacity: 0.6;
}

.auth-online {
    background: #e6f4ea;
    color: #137333;
}

.auth-offline {
    background: #fce8e6;
    color: #c5221f;
}

.auth-busy {
    background: #e8f0fe;
    color: #174ea6;
}

div.card audio {
  margin-top: 5px;
  width: 100%;
}

table.card {    
    border-spacing: 0;
    margin: 0px;
    padding: 0px;

    table-layout: fixed;
    width: 100%;
}

table.card tr {
    padding-bottom: 10px;
    padding-top: 10px;
    box-shadow: inset 0 -1px 0 0 rgba(100,121,143,0.122);

/*    background: rgba(255,255,255,0.902);*/

    cursor: pointer;    
}

table.card tr:hover {
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

table.card tr.archive-playing {
    background-color: #cce9ff;
    box-shadow: inset 3px 0 0 #1a73e8, inset 0 -1px 0 0 rgba(100,121,143,0.122);
}

table.card tr.archive-playing:hover {
    box-shadow: inset 3px 0 0 #1a73e8, inset 0 1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.3), 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

table.card th {
    list-style: none inside;
}

table.card td {
    list-style: none inside;
}

table.card span {
    display: block;
    width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.A {
    width: 50px;
}
.B {
    width: 50px;
}
.C {
    width: 60px;
}
.D {
    width: auto;
}

/* table-layout: auto だとファイル名が長い（空白を含まない）場合に列幅計算が
   コンテナ幅を無視して広がってしまうため fixed にする。archive-table は
   colgroup を持たず「削除を表示」で列数が 4/5 に変わるため、日付・時間・
   ボタン列は末尾からの位置（nth-last-child）で固定幅にし、名前列（最終列）に
   残り幅を割り当てる。はみ出しは span 側の ellipsis（table.card span）で
   「...」省略にする。 */
#archive-table {
    table-layout: fixed;
}

#archive-table th {
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
}

#archive-table th:not(:last-child),
#archive-table td:not(:last-child) {
    white-space: nowrap;
}

#archive-table th:nth-last-child(2),
#archive-table td:nth-last-child(2) {
    width: 60px; /* 再生ボタン */
}

#archive-table th:nth-last-child(3),
#archive-table td:nth-last-child(3) {
    width: 60px; /* 時間 */
}

#archive-table th:nth-last-child(4),
#archive-table td:nth-last-child(4) {
    width: 130px; /* 日付（20260921(月) が省略されない幅） */
}

#archive-table th:nth-last-child(5),
#archive-table td:nth-last-child(5) {
    width: 90px; /* 削除済み（「削除を表示」時のみ表示される列） */
}

table.card th.unsorted,
table.card th.sort-ascending,
table.card th.sort-descending {
    cursor: pointer;
    user-select: none;
}

table.card th.unsorted:hover,
table.card th.sort-ascending:hover,
table.card th.sort-descending:hover {
    color: #1a73e8;
}

table.card th.unsorted:after {
    content: "\021C5";
    margin-left: 4px;
    opacity: 0.5;
}

table.card th.sort-ascending:after {
    content: "\02191";
    margin-left: 4px;
}

table.card th.sort-descending:after {
    content: "\02193";
    margin-left: 4px;
}

table.card th .sort-order {
    display: inline;
    width: auto;
    font-size: 10px;
    vertical-align: super;
    margin-left: 2px;
}

table.card tr.archive-deleted {
    background-color: whitesmoke;
}

#station-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 4px 5px;
}

.station-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
}

.station-label input {
    margin-right: 3px;
}

/* table tr td {
    text-align: center;
} */

#passkey-login-screen {
    max-width: 360px;
    margin: 60px auto;
}

#passkey-login-screen #passkey-login-button {
    display: block;
    width: 100%;
    height: 40px;
    font-size: 15px;
    margin-bottom: 10px;
}

.passkey-error {
    color: #c5221f;
    font-size: 13px;
    margin: 8px 0;
    height: auto;
}

#login-dialog {
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    padding: 20px 24px;
    min-width: 280px;
}

#login-dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.login-title {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 14px;
    height: auto;
}

.login-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.login-field label {
    font-size: 12px;
    margin-bottom: 3px;
    height: auto;
}

.login-field input {
    height: 28px;
    padding: 0 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.login-field-checkbox {
    margin-bottom: 10px;
}

.login-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.login-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
    height: auto;
}

.login-actions button {
    height: 28px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.archive-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.archive-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 4px 0 6px;
}

.archive-filter input[type="text"] {
    height: 26px;
    padding: 0 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    width: 180px;
    box-sizing: border-box;
}

.archive-filter input[type="date"] {
    height: 26px;
    padding: 0 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.filter-sep {
    padding: 0 2px;
    height: auto;
}

table.card tr.recorded {
    background-color: #e8f5e9;
    box-shadow: inset 3px 0 0 #4caf50, inset 0 -1px 0 0 rgba(100,121,143,0.122);
}

table.card tr.recorded:hover {
    box-shadow: inset 3px 0 0 #4caf50, inset 0 1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.3), 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

table.card tr.rec-candidate {
    background-color: #fff8e1;
    box-shadow: inset 3px 0 0 #ff9800, inset 0 -1px 0 0 rgba(100,121,143,0.122);
}

table.card tr.rec-candidate:hover {
    box-shadow: inset 3px 0 0 #ff9800, inset 0 1px 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.3), 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

/* 通知（管理者のみ表示） */
div.card span.notify-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 10px;
    background: #c5221f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
}

#notify-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}

.notify-empty {
    color: #5f6368;
    font-size: 13px;
    padding: 4px;
}

.notify-item {
    box-shadow: inset 0 -1px 0 0 rgba(100,121,143,0.122);
    padding: 4px 6px;
}

.notify-item.notify-unread {
    background-color: #fff8e1;
    box-shadow: inset 3px 0 0 #ff9800, inset 0 -1px 0 0 rgba(100,121,143,0.122);
}

.notify-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 8px;
    font-size: 13px;
}

div.card .notify-head span {
    padding: 0;
}

div.card span.notify-level {
    border-radius: 3px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    background: #e8eaed;
    color: #3c4043;
}

div.card span.notify-level-WARNING {
    background: #fef7e0;
    color: #b06000;
}

div.card span.notify-level-ERROR, div.card span.notify-level-CRITICAL {
    background: #fce8e6;
    color: #c5221f;
}

.notify-meta {
    color: #5f6368;
}

.notify-text {
    margin: 4px 0 0;
    font-family: inherit;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.notify-head button {
    margin-left: auto;
}
