/* 連絡の画面（チャット・呼び出し・通知・会議から戻る・入室前の準備・最初の案内）。style.css の変数と部品をそのまま使う。
   CSP で style="" が使えないため、見た目はすべてクラスで書く。 */

/* 入室前の準備・入室後の機器の切り替え */
.prep-box, .dev-box { font-size: 13px; }
.prep-box summary, .dev-box summary { cursor: pointer; color: var(--muted); }
.dev-box { margin-top: 8px; }
.device-panel { display: grid; gap: 8px; margin-top: 8px; }
.device-panel label { display: grid; gap: 4px; font-size: 13px; }
.device-panel select, .device-panel button { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.join .device-panel button { color: var(--ink); background: #fff; padding: 6px 8px; font-size: 13px; }
.device-panel meter { width: 100%; height: 14px; }
.device-panel .note.bad { color: #b91c1c; }

/* 最初の案内（画面をふさがないカード） */
.guide { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.guide-title { font-weight: 700; }
.guide-text { margin: 4px 0 8px; }
.guide-contact { margin: 8px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.guide-row { display: flex; gap: 6px; align-items: center; }
.guide-count { color: var(--muted); font-size: 12px; margin-right: auto; }
.guide button { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.guide button.primary { background: var(--brand-text); border-color: var(--brand-text); color: #fff; }
.guide button.link { border: 0; background: none; color: var(--muted); padding: 0; margin-top: 6px; text-decoration: underline; }
.guide button:disabled { opacity: .5; cursor: default; }

/* チャット */
.chat-box { margin-top: 10px; font-size: 13px; }
.chat-box summary { cursor: pointer; font-weight: 600; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--brand-text); color: #fff; font-size: 11px; text-align: center; font-weight: 700; }
.chat-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 4px; }
.chat-tab { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.chat-tab[aria-selected="true"] { background: var(--brand-text); border-color: var(--brand-text); color: #fff; }
#chat-dm-with { font: inherit; font-size: 12px; margin: 4px 0; padding: 4px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.chat-log { list-style: none; margin: 6px 0; padding: 6px; height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fbfaf8; font-size: 12px; }
.chat-log li { padding: 2px 0; line-height: 1.5; }
.chat-log time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.chat-log b { margin-right: 6px; }
.chat-log .mine b { color: var(--brand-text); }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 6px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; font: inherit; font-size: 13px; line-height: 1.4; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; max-height: 140px; }
.chat-link { color: var(--brand-text); text-decoration: underline; }
.chat-form button { font: inherit; font-size: 13px; padding: 6px 12px; border: 0; border-radius: 6px; background: var(--brand-text); color: #fff; cursor: pointer; }
.chat-box .bad { color: #b91c1c; }
.chat-log .chat-day { margin: 6px 0 2px; padding: 1px 0; text-align: center; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); }
.chat-log .chat-older { color: var(--muted); font-style: italic; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }

/* 通知の設定 */
.notify-box { margin-top: 8px; display: grid; gap: 6px; font-size: 12px; }
.notify-box button { font: inherit; font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; justify-self: start; }
.notify-box .check { display: flex; gap: 6px; align-items: center; }

/* 一覧の「呼ぶ」「チャット」 */
.people li { flex-wrap: wrap; }
.people .attend { border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }

/* 招待：承認を求める */
.invite-box form label.invite-approval { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; font-size: 12px; }

/* 呼び出し・来客・承認のお知らせ（地図の左下に重ねる。押せるのはお知らせ本体だけ＝地図の操作をふさがない） */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 10px 12px; font-size: 14px; }
.toast.call { border-left-color: #2563eb; }
.toast.visitor { border-left-color: var(--brand-text); }
.toast-text { line-height: 1.5; overflow-wrap: anywhere; }
.toast-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.toast-actions button { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.toast-actions button.primary { background: var(--brand-text); border-color: var(--brand-text); color: #fff; }
.toast-actions button.link { border: 0; background: none; color: var(--muted); padding: 0; text-decoration: underline; }
.toast-actions button:disabled { opacity: .6; cursor: default; }

/* 会議から戻る（別のタブで Meet・Zoom に参加している間、地図の上に大きく出す） */
.meeting-return { position: sticky; top: 0; z-index: 10; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; padding: 14px 16px; background: #fff7ed; border: 2px solid var(--brand-text); border-radius: 10px; }
.meeting-info { display: grid; gap: 2px; font-size: 15px; }
.meeting-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.meeting-return button { font: inherit; font-size: 20px; font-weight: 700; padding: 14px 28px; border: 0; border-radius: 10px; background: var(--brand-text); color: #fff; cursor: pointer; }

.notice-stack { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 32px); pointer-events: none; }
.notice-stack .toasts { position: static; width: auto; }
/* 入室の承認待ち：通常のお知らせの上に積む（右上の操作＝退室などを隠さない）。全件を操作できるよう、増えたらこの欄の中で動かす */
.approval-list { pointer-events: auto; display: grid; gap: 8px; max-height: 45vh; overflow-y: auto; padding: 8px; background: #fff7ed; border: 2px solid var(--brand-text); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.approval-list[hidden] { display: none; }
.approval-head { margin: 0; font-size: 13px; color: var(--ink); }
.chat-log .chat-more { padding: 4px 0 6px; text-align: center; }
.chat-more-btn { font: inherit; font-size: 12px; min-height: 32px; padding: 4px 14px; border: 1px solid var(--brand-text); border-radius: 14px; background: #fff; color: var(--brand-text); cursor: pointer; }
.chat-more-btn:disabled { opacity: .7; cursor: default; }

#support-contact { overflow-wrap: anywhere; }
