/* 訪問介護・看護システム  画面共通スタイル */

/* Cocoon(子テーマ)の本文幅制限・中央寄せ・サイドバーを解除して全幅化 */
body.wh-fullwidth #wrap,
body.wh-fullwidth #content,
body.wh-fullwidth #content .content,
body.wh-fullwidth #content-in,
body.wh-fullwidth .content-in,
body.wh-fullwidth .wrap,
body.wh-fullwidth #main,
body.wh-fullwidth .main,
body.wh-fullwidth .main-column,
body.wh-fullwidth article,
body.wh-fullwidth .entry-content {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	float: none !important;
	box-sizing: border-box;
}
body.wh-fullwidth #sidebar,
body.wh-fullwidth .sidebar {
	display: none !important;
}
body.wh-fullwidth #main {
	margin-right: 0 !important;
	float: none !important;
}
body.wh-fullwidth #content {
	padding: 18px 14px 6px !important;
}

/* 業務ツール向けに不要なサイト要素を非表示（ヘッダー/SNS/パンくず/ナビ/タイトル/フッター）*/
body.wh-fullwidth #header-container,
body.wh-fullwidth .sns-share,
body.wh-fullwidth .sns-follow,
body.wh-fullwidth .breadcrumb,
body.wh-fullwidth #breadcrumb,
body.wh-fullwidth .navi,
body.wh-fullwidth #navi,
body.wh-fullwidth .entry-title,
body.wh-fullwidth .article-header,
body.wh-fullwidth .author-box,
body.wh-fullwidth .author-info,
body.wh-fullwidth .footer,
body.wh-fullwidth #footer {
	display: none !important;
}

/* 上の余白を詰めてカレンダーを最上部へ */
body.wh-fullwidth #content,
body.wh-fullwidth #content-in,
body.wh-fullwidth .content-in,
body.wh-fullwidth #main,
body.wh-fullwidth .main,
body.wh-fullwidth article,
body.wh-fullwidth .entry-content {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* テーマの見出し装飾（h2の灰色背景など）をアプリ内では無効化 */
.wh-app h2,
.wh-app h3,
.wh-app h4,
.wh-app .fc-toolbar-title {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	color: #3c4043 !important;
}

/* カレンダーのみ1画面完結。ページ自体のスクロールバーを抑制 */
body.wh-noscroll { overflow: hidden !important; }

/* アプリ本体レイアウト（親が全幅化されたので width:100% で広がる）*/
.wh-app {
	width: 100%;
	box-sizing: border-box;
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 16px;
	align-items: flex-start;
	padding: 0;
}

/* 左サイドバー */
.wh-sidebar {
	flex: 0 0 230px;
	width: 230px;
	background: #fff;
	border-radius: 12px;
	padding: 16px 10px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
	position: sticky;
	top: 16px;
}

/* ＋作成ボタン（Google風の浮いたピル）*/
.wh-create-btn {
	display: block;
	width: 100%;
	padding: 12px 16px;
	margin-bottom: 18px;
	border: none;
	border-radius: 24px;
	background: #fff;
	color: #3c4043;
	box-shadow: 0 1px 3px rgba(60, 64, 67, .3);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
}
.wh-create-btn:hover { box-shadow: 0 1px 8px rgba(60, 64, 67, .35); background: #f8f9fa; }

/* メニュー */
.wh-menu { display: flex; flex-direction: column; gap: 1px; margin-bottom: 18px; }
.wh-menu__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-radius: 0 24px 24px 0;
	color: #3c4043;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.2;
}
.wh-menu__item:hover { background: #f1f3f4; }
.wh-menu__item.is-active { background: #e8f0fe; color: #1967d2; font-weight: 700; }
.wh-menu__ic { font-size: 16px; width: 18px; text-align: center; }

/* 絞り込み */
.wh-side-filters { border-top: 1px solid #ececec; padding-top: 14px; }
.wh-side-filters h4 { margin: 0 0 10px; font-size: 12px; color: #5f6368; letter-spacing: .04em; }
.wh-side-filters label { display: block; font-size: 13px; margin-bottom: 12px; color: #3c4043; }
.wh-side-filters select {
	width: 100%;
	margin-top: 4px;
	padding: 7px 8px;
	border: 1px solid #dadce0;
	border-radius: 6px;
	font-size: 14px;
}

/* 本体（カレンダー）*/
.wh-main { flex: 1 1 0%; min-width: 0; width: auto; }
#wh-calendar {
	background: #fff;
	padding: 14px 16px;
	border-radius: 12px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
/* === Google風コンパクト・ツールバー === */
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 8px; }
.fc .fc-toolbar-title { font-size: 1.05rem !important; font-weight: 600 !important; }
.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk { display: flex; align-items: center; gap: 6px; }

.fc .fc-button {
	padding: 5px 12px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	border-radius: 6px !important;
	box-shadow: none !important;
}
.fc .fc-button-primary {
	background: #fff !important;
	border-color: #dadce0 !important;
	color: #3c4043 !important;
}
.fc .fc-button-primary:not(:disabled):hover { background: #f1f3f4 !important; color: #1967d2 !important; }
.fc .fc-button-primary:not(:disabled).fc-button-active {
	background: #e8f0fe !important;
	border-color: #1967d2 !important;
	color: #1967d2 !important;
}
/* 前後の矢印は枠なしのアイコンボタンに */
.fc .fc-prev-button, .fc .fc-next-button {
	background: transparent !important;
	border: none !important;
	color: #3c4043 !important;
	padding: 5px 8px !important;
}
.fc .fc-prev-button:hover, .fc .fc-next-button:hover { background: #f1f3f4 !important; border-radius: 50% !important; }
.fc .fc-today-button { text-transform: none; border-radius: 18px !important; }

/* === マス・曜日・日付（小さめ） === */
.fc .fc-col-header-cell-cushion { font-size: 12px; color: #70757a; padding: 6px 4px; font-weight: 500; }
.fc .fc-daygrid-day-number { font-size: 12px; padding: 2px 6px; color: #3c4043; }
.fc .fc-day-today { background: #fff !important; }
.fc .fc-day-today .fc-daygrid-day-number {
	background: #1a73e8; color: #fff !important;
	border-radius: 12px; min-width: 24px; height: 24px;
	padding: 0 5px; box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center;
	margin: 2px; font-weight: 600;
}

/* === 予定（小さめ・Google風の帯） === */
.fc-event { cursor: pointer; border: none; }
.fc .fc-daygrid-event {
	font-size: 11px;
	line-height: 1.4;
	padding: 0 5px;
	margin: 1px 4px;
	border-radius: 4px;
}
/* 予定は必ず1行に収め、はみ出しは「…」で省略 */
.fc .fc-daygrid-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-time {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fc .fc-daygrid-event .fc-event-time { margin-right: 3px; }
.fc .fc-daygrid-more-link {
	font-size: 11px;
	color: #5f6368;
	font-weight: 500;
	padding: 0 4px;
}

/* === 週/日（timeGrid）をGoogle風に === */
.fc .fc-timegrid-slot-label-cushion { font-size: 11px; color: #70757a; }
.fc .fc-timegrid-axis-cushion { font-size: 11px; color: #70757a; }
.fc .fc-timegrid-event { border-radius: 5px; padding: 1px 4px; box-shadow: none; }
.fc .fc-timegrid-event .fc-event-time { font-size: 10px; opacity: .85; }
.fc .fc-timegrid-event .fc-event-title {
	font-size: 11px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fc .fc-timegrid-now-indicator-line { border-color: #ea4335; }
.fc .fc-timegrid-now-indicator-arrow { border-color: #ea4335; color: #ea4335; }
.fc .fc-col-header-cell.fc-day-today .fc-col-header-cell-cushion { color: #1a73e8; font-weight: 700; }

/* 予定エリアの右に余白を残し、同じ時間帯に予定を追加できるように */
.fc .fc-timegrid-col-events { margin-right: 12%; }

/* 終日チェックの行（チェックボックスと文言を横並びで分かりやすく）*/
.wh-allday-row label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	cursor: pointer;
}
.wh-modal__box input[type="checkbox"] {
	width: 18px;
	height: 18px;
	min-width: 18px;
	margin: 0;
	flex: 0 0 auto;
}

/* 罫線をくっきり＆連続に */
.fc-theme-standard td,
.fc-theme-standard th { border-color: #d2d5d9 !important; }
/* 週/日表示：30分の線は消して、1時間ごとの線だけ残す */
.fc .fc-timegrid-slot-minor { border-top-style: none !important; }
/* 列（縦）の罫線を上から下まで連続表示 */
.fc .fc-timegrid-cols .fc-timegrid-col { border-right: 1px solid #d2d5d9; }
.fc .fc-timegrid-axis { border-right: 1px solid #d2d5d9; }

/* スクロールバーは見せない（expandRowsで収まる前提の保険）*/
.fc .fc-scroller { scrollbar-width: none; }
.fc .fc-scroller::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* レイアウト：狭い画面はサイドバーを上に積む */
@media (max-width: 680px) {
	.wh-app { flex-direction: column; padding: 4px 6px 20px; }
	.wh-sidebar { width: auto; flex: none; position: static; }
}

/* --- モーダル ------------------------------------------------ */
.wh-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	background: rgba(0, 0, 0, .45);
	z-index: 100000;
	padding: 24px 0;
	box-sizing: border-box;
	overflow-y: auto;
	display: block;
}
.wh-modal[hidden] { display: none; }
.wh-modal__box {
	background: #fff;
	box-sizing: border-box;
	width: calc(100vw - 24px);
	max-width: 460px;
	margin: 0 auto;
	border-radius: 10px;
	padding: 20px 22px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.wh-modal__box h3,
.wh-modal__box .wh-h3 { margin: 0 0 12px; font-size: 1.1rem; font-weight: 700; }
.wh-modal__box p { margin: 0 0 12px; }
.wh-modal__box label { font-size: 14px; font-weight: 600; }
.wh-modal__box select,
.wh-modal__box input,
.wh-modal__box textarea {
	width: 100%;
	padding: 7px 8px;
	margin-top: 4px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
}
.wh-row { display: flex; gap: 10px; }
.wh-row p { flex: 1; }
.wh-req { color: #c62828; margin-left: 2px; }

.wh-msg {
	background: #fff3e0;
	color: #b71c1c;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 14px;
}
.wh-msg[hidden] { display: none; }

.wh-modal__actions { display: flex; align-items: center; gap: 8px; }
.wh-spacer { flex: 1; }
.wh-btn {
	padding: 8px 16px;
	border: 1px solid #bbb;
	background: #f5f5f5;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}
.wh-btn--primary { background: #1565c0; border-color: #1565c0; color: #fff; }
.wh-btn--danger { background: #fff; border-color: #c62828; color: #c62828; }

/* スマホ */
@media (max-width: 640px) {
	.wh-row { flex-direction: column; gap: 0; }
	.fc .fc-toolbar { flex-direction: column; gap: 6px; }
}

/* ページ編集で誤って付いた <strong>/<code> 等をレイアウト無効化（全幅を妨げないように）*/
body.wh-fullwidth strong,
body.wh-fullwidth code {
	display: contents;
	font: inherit;
	background: none;
}
/* 段落ブロック等が作る本文直下の <p> ラッパー余白を打ち消し、上部余白をページ間で統一 */
body.wh-fullwidth .entry-content > p,
body.wh-fullwidth article > p,
body.wh-fullwidth .post_content > p {
	margin: 0 !important;
	padding: 0 !important;
}
/* 医師カラーチップ */
.wh-doc-chip {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 11px;
	color: #fff;
	font-size: 12px;
	line-height: 1.6;
	white-space: nowrap;
}
/* 医師割当パレット（ドラッグ元）*/
.wh-doc-palette {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 8px 0 4px;
	padding: 8px 10px;
	background: #f1f6ff;
	border: 1px solid #cfe0ff;
	border-radius: 8px;
}
.wh-pal-label { font-size: 12px; color: #5f6368; font-weight: 600; }
.wh-pal-chip {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 13px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	cursor: grab;
	user-select: none;
	box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.wh-pal-chip:active { cursor: grabbing; }
.wh-pal-chip.wh-pal-clear { background: #9aa0a6; }
/* 医師割当モード中のドロップ対象ヒント */
.wh-mode-docassign .wh-nm-pt { cursor: copy; }
.wh-mode-docassign .wh-cell:hover { outline: 2px dashed #9cc3ff; outline-offset: -2px; }

/* 訪問以外の自由予定（カレンダーのメモ）*/
.wh-cell-note {
	font-size: 10.5px;
	line-height: 1.3;
	margin: 1px 1px 0;
	padding: 1px 4px;
	background: #fff5d6;
	border: 1px solid #ecd98a;
	border-radius: 3px;
	color: #6b5800;
	white-space: normal;
	word-break: break-all;
}
.wh-mode-note .wh-cell { cursor: cell; }
.wh-mode-note .wh-cell:hover { outline: 2px dashed #f0c040; outline-offset: -2px; }
.wh-mode-note .wh-cell-note { cursor: pointer; }
.wh-mode-note .wh-cell-note:hover { background: #ffe9a8; }

/* ビュー別 備考のインライン入力（カレンダー下）*/
.wh-vmemo-inline { margin: 12px 0 6px; }
.wh-vmemo-inline__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.wh-vmemo-inline label { font-size: 13px; font-weight: 700; color: #5f6368; }
.wh-vmemo-status { font-size: 12px; color: #1a73e8; }
.wh-vmemo-inline textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #dadce0;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.6;
	resize: vertical;
}

/* === 上部ナビ（カレンダー／マスタ管理）=== */
.wh-topnav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e0e0e0;
}
.wh-topnav__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 8px;
	text-decoration: none;
	color: #3c4043;
	font-weight: 700;
	font-size: 14px;
}
.wh-topnav__item:hover { background: #f1f3f4; }
.wh-topnav__item.is-active { background: #e8f0fe; color: #1967d2; }
.wh-topnav__right { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; }
.wh-topnav__user { font-size: 13px; font-weight: 600; color: #5f6368; white-space: nowrap; }
.wh-topnav__logout { color: #c5221f; }
.wh-topnav__logout:hover { background: #fde7e9; }
.wh-master-wrap { width: 100%; }

/* === 専用ログイン画面 === */
.wh-login {
	min-height: 78vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}
.wh-login__card {
	width: 100%;
	max-width: 380px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 34px rgba(0, 0, 0, .14);
	padding: 30px 28px;
	box-sizing: border-box;
}
.wh-login__brand {
	font-size: 19px;
	font-weight: 800;
	text-align: center;
	color: #1a3a6b;
	margin-bottom: 22px;
	line-height: 1.4;
}
.wh-login__brand span { display: block; font-size: 14px; color: #5f6368; font-weight: 700; margin-top: 2px; }
.wh-login__form label { display: block; font-size: 13px; font-weight: 600; color: #3c4043; margin-bottom: 14px; }
.wh-login__form input[type="text"],
.wh-login__form input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	margin-top: 5px;
	border: 1px solid #dadce0;
	border-radius: 8px;
	font-size: 15px;
}
.wh-login__remember { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.wh-login__remember input { width: auto; margin: 0; }
.wh-login__btn {
	display: block;
	width: 100%;
	padding: 12px;
	margin-top: 10px;
	border: none;
	border-radius: 8px;
	background: #1565c0;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
}
.wh-login__btn:hover { background: #0d47a1; color: #fff; }
.wh-login__err {
	background: #fde7e9;
	color: #c5221f;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 16px;
}

/* === 管理画面（利用者・スタッフ・サービス種別）=== */
.wh-admin {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
	padding: 16px 20px 24px;
}
.wh-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid #e0e0e0;
	margin-bottom: 14px;
}
.wh-tab {
	border: none;
	background: none;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: #5f6368;
	cursor: pointer;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
}
.wh-tab:hover { color: #1967d2; }
.wh-tab.is-active { color: #1967d2; border-bottom-color: #1967d2; }

.wh-admin-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.wh-admin-head .wh-h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }

.wh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wh-table th, .wh-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
}
.wh-table th { color: #5f6368; font-weight: 600; font-size: 13px; background: #f8f9fa; }
.wh-table tbody tr:hover { background: #f8fbff; }
.wh-table tbody tr.wh-inactive td { color: #aaa; background: #fafafa; }
.wh-table tbody tr.wh-inactive:hover { background: #f3f3f3; }
.wh-row-actions { text-align: right; width: 1%; white-space: nowrap; }
.wh-empty { color: #999; text-align: center; padding: 24px; }
.wh-btn--sm { padding: 4px 12px; font-size: 13px; }

/* マスタ管理：施設フィルタ・訪問サイクル編集 */
.wh-m-filter { margin: 0 0 12px; font-size: 14px; display: flex; flex-wrap: wrap; row-gap: 12px; align-items: center; }
/* テーマ等が差し込む <strong>/<code> ラッパーをレイアウト無効化（spanを直接の並びにする）*/
.wh-m-filter strong, .wh-m-filter code { display: contents; font: inherit; background: none; }
.wh-m-filter span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin-right: 48px; }
.wh-m-filter span:last-child { margin-right: 0; }
.wh-m-filter select,
.wh-m-filter input {
	box-sizing: border-box;
	height: 38px;
	padding: 6px 10px;
	border: 1px solid #dadce0;
	border-radius: 6px;
	font-size: 14px;
	width: auto;
	min-width: 180px;
	max-width: 260px;
	margin: 0;
}
.wh-admin-head > div { display: flex; gap: 8px; }

.wh-cycle { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.wh-cycle-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
	padding: 8px;
	border: 1px solid #eee;
	border-radius: 8px;
	background: #fafafa;
}
.wh-cycle-row .wh-cy-wd { width: auto; min-width: 72px; padding: 5px 6px; margin: 0; }
.wh-cy-lbl { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.wh-cycle-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.wh-cy-del {
	margin-left: auto;
	border: 1px solid #e0b4b4;
	background: #fff;
	color: #c62828;
	width: 26px; height: 26px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
}

/* === スタッフ用スマホ画面 === */
.wh-staff { max-width: 560px; margin: 0 auto; }
.wh-staff-head {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}
/* 日付（タップでミニカレンダーが開くボタン）*/
.wh-staff-date {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: none;
	background: none;
	font-size: 1.05rem;
	font-weight: 700;
	color: #3c4043;
	cursor: pointer;
	padding: 6px 8px;
	border-radius: 8px;
	white-space: nowrap;
}
.wh-staff-date:hover { background: #f1f3f4; }
.wh-cal-ic { font-size: 15px; }
/* ネイティブの日付入力は隠して、ボタンから showPicker() で開く */
.wh-hidden-date {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}
.wh-nav-btn {
	width: 40px;
	height: 40px;
	border: 1px solid #dadce0;
	background: #fff;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	color: #3c4043;
	cursor: pointer;
}
.wh-nav-btn:hover { background: #f1f3f4; }

.wh-staff-list { display: flex; flex-direction: column; gap: 10px; }
.wh-staff-empty { color: #777; text-align: center; padding: 30px 0; }

.wh-visit {
	display: flex;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.wh-visit:hover { background: #f8fbff; }
.wh-visit-main { flex: 1 1 auto; min-width: 0; }
.wh-visit-time {
	font-weight: 700;
	color: #1565c0;
	font-size: 13px;
	margin-bottom: 2px;
}
.wh-visit-name { font-size: 16px; font-weight: 700; color: #222; }
.wh-visit-sub { font-size: 13px; color: #5f6368; margin-top: 2px; }
.wh-visit-inst { font-size: 12px; color: #b26a00; margin-top: 4px; }
.wh-visit-status { display: flex; align-items: center; }

.wh-badge {
	font-size: 12px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
}
.wh-badge--todo { background: #eee; color: #777; }
.wh-badge--done { background: #e6f4ea; color: #0b8043; }
.wh-badge--skip { background: #fde7e9; color: #c5221f; }

/* 実績モーダル内 */
.wh-j-info {
	background: #f5f7fa;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-size: 14px;
}
.wh-j-inst { color: #b26a00; font-size: 13px; margin-top: 4px; }
.wh-done-toggle { display: flex; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.wh-done-toggle label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* === 月間予定表（Excel印刷様式の月グリッド）=== */
.wh-sched-wrap { width: 100%; }
.wh-sched-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-bottom: 0;
}
/* ツールバー＋医師パレットをまとめて上部に固定（折り返しても追従）*/
.wh-sched-top {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 30;
	background: #fff;
	padding: 8px 0 8px;
	margin-bottom: 12px;
	border-bottom: 1px solid #eaeaea;
}
.wh-sched-views { display: flex; gap: 12px; }
.wh-sched-nav { margin: 0 6px; }
.wh-vtab {
	border: 1px solid #dadce0;
	background: #fff;
	padding: 9px 20px;
	font-size: 14px;
	font-weight: 600;
	color: #5f6368;
	cursor: pointer;
	border-radius: 8px;
}
.wh-vtab:hover { background: #f1f3f4; }
.wh-vtab.is-active { background: #e8f0fe; color: #1967d2; border-color: #1967d2; }
.wh-sched-pick select { padding: 7px 8px; border: 1px solid #dadce0; border-radius: 8px; font-size: 14px; min-width: 160px; }
.wh-sched-nav { display: flex; align-items: center; gap: 16px; }
.wh-sched-month { font-size: 1.05rem; font-weight: 700; min-width: 110px; text-align: center; }
.wh-sched-bar .wh-btn--primary { margin-left: auto; }

/* 印刷シート */
.wh-sched-sheet { background: #fff; padding: 6px; }
.wh-sched-head { display: flex; align-items: flex-start; gap: 10px; }
.wh-sched-head .wh-sched-title { order: 1; flex: 1 1 auto; min-width: 0; }
.wh-clinic {
	order: 2;
	flex: 0 0 auto;
	text-align: right;
	line-height: 1.3;
	padding-top: 2px;
}
.wh-clinic__name { font-weight: 700; font-size: 13px; }
.wh-clinic__addr { font-size: 10px; color: #333; }
.wh-clinic__tel { font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.wh-sched-title {
	font-size: 22px;
	font-weight: 700;
	text-align: center;
	padding: 6px 0 10px;
}
.wh-sched-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 8px 4px 0;
	font-size: 13px;
}
.wh-sched-tel { font-weight: 700; white-space: nowrap; }

/* 印刷フッターの備考メッセージ */
.wh-sched-memo {
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 8px 12px;
	margin: 8px 4px 0;
	font-size: 13px;
	line-height: 1.6;
	min-height: 48px;
	white-space: normal;
}

/* 印刷ページの備考入力 */
.wh-print-memo { margin-bottom: 14px; }
.wh-print-memo > label { font-size: 13px; font-weight: 600; color: #5f6368; }
.wh-print-memo__row { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; }
.wh-print-memo__row textarea {
	flex: 1;
	padding: 7px 9px;
	border: 1px solid #dadce0;
	border-radius: 6px;
	font-size: 14px;
	resize: vertical;
}

/* 月グリッド本体 */
table.wh-sched {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}
table.wh-sched th, table.wh-sched td { border: 1px solid #b0b0b0; }
table.wh-sched th.wh-dow {
	background: #808080;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	padding: 4px 0;
	text-align: center;
}
table.wh-sched th.wh-dow.wh-sun { background: #9a6464; }
table.wh-sched th.wh-dow.wh-sat { background: #64779a; }
.wh-cell {
	height: 120px;
	vertical-align: top;
	padding: 2px 3px;
	overflow: hidden;
}
.wh-cell.wh-out { background: #f3f3f3; }
.wh-cell.wh-sun { background: #fbf4f4; }
.wh-cell.wh-sat { background: #f4f6fb; }
.wh-cell-day { font-size: 13px; font-weight: 700; text-align: center; color: #333; line-height: 1.3; }
.wh-cell-maru { text-align: center; font-size: 30px; line-height: 1; color: #1a73e8; margin-top: 16px; }
.wh-cell-names { display: flex; gap: 3px; margin-top: 1px; }

/* 個人1人ビュー（個別印刷）：印刷時に家族配布用として大きく・分かりやすく（画面は等倍）*/
@media print {
	@page { margin: 6mm; }
	.wh-sched-sheet.wh-solo { padding: 0; }
	.wh-sched-sheet.wh-solo .wh-sched-title { font-size: 26px; padding: 0 0 8px; }
	.wh-sched-sheet.wh-solo table.wh-sched th.wh-dow { font-size: 19px; padding: 5px 0; }
	/* 全マス同じ高さ（○の有無で変えない）。○は枠内に収まるサイズに */
	.wh-sched-sheet.wh-solo .wh-cell { height: 104px; }
	.wh-sched-sheet.wh-solo .wh-cell-day { font-size: 28px; font-weight: 800; color: #000; line-height: 1.05; }
	.wh-sched-sheet.wh-solo .wh-cell-maru { font-size: 74px; font-weight: 900; margin-top: 0; line-height: 0.92; color: #1558d6; -webkit-text-stroke: 2.5px #1558d6; }
	.wh-sched-sheet.wh-solo .wh-hol-tag { font-size: 14px; }
	.wh-sched-sheet.wh-solo .wh-sched-note { font-size: 14px; }
	.wh-sched-sheet.wh-solo .wh-sched-foot { font-size: 18px; padding-top: 6px; }
	.wh-sched-sheet.wh-solo .wh-sched-tel { font-size: 24px; font-weight: 800; }
}

/* モード切替（クリック / D&D）*/
.wh-mode { display: inline-flex; border: 1px solid #dadce0; border-radius: 8px; overflow: hidden; }
.wh-mode-btn { border: none; background: #fff; padding: 9px 16px; font-size: 13px; font-weight: 600; color: #5f6368; cursor: pointer; }
.wh-mode-btn + .wh-mode-btn { border-left: 1px solid #dadce0; }
.wh-mode-btn.is-active { background: #e8f0fe; color: #1967d2; }

/* 名前のクリック／ドラッグ状態 */
.wh-nm-fac { color: #333; font-weight: 700; }
.wh-nm-fac[data-names] { cursor: help; }

/* 施設ホバーで患者名を縦並び表示（独自ツールチップ）*/
.wh-tip {
	position: fixed;
	z-index: 99999;
	max-width: 320px;
	background: #1f2a44;
	color: #fff;
	border: 1px solid #3a4a6b;
	border-radius: 8px;
	padding: 8px 11px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
	font-size: 13.5px;
	line-height: 1.7;
	pointer-events: none;
}
.wh-tip__head {
	font-weight: 700;
	color: #ffd86b;
	border-bottom: 1px solid rgba(255, 255, 255, .25);
	margin-bottom: 5px;
	padding-bottom: 4px;
}
.wh-tip__row { white-space: nowrap; }
.wh-tip__row::before { content: "・"; color: #9db4e0; }
.wh-mode-click .wh-nm-pt { cursor: pointer; }
.wh-mode-click .wh-nm-pt:hover { text-decoration: underline; color: #1565c0; }
.wh-mode-dnd .wh-nm-pt { cursor: grab; }
.wh-mode-dnd .wh-nm-pt:active { cursor: grabbing; }
.wh-mode-dnd .wh-cell:hover { outline: 2px dashed #9cc3ff; outline-offset: -2px; }
.wh-mode-dnd .wh-cell-day { cursor: grab; border-radius: 4px; }
.wh-mode-dnd .wh-cell-day:hover { background: #e8f0fe; color: #1967d2; }

/* 祝日・外来休診日 */
.wh-cell.wh-holiday { background: #f4f4f4; }
.wh-hol-tag { font-size: 10px; font-weight: 700; text-align: center; border-radius: 3px; margin: 1px 2px; padding: 0 2px; }
.wh-hol-tag.wh-hol-1 { color: #c5221f; background: #fde7e9; }
.wh-hol-tag.wh-hol-2 { color: #8a6d00; background: #fff3cd; }
.wh-hol-list { margin: 10px 0; max-height: 220px; overflow: auto; }
.wh-hol-auto { font-size: 12px; color: #9aa0a6; }
.wh-cell-names .wh-col { flex: 1 1 50%; min-width: 0; }
.wh-nm {
	font-size: 11px;
	line-height: 1.45;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #1a3a6b;
}

/* 印刷用ルート（画面では非表示。印刷時のみ body 直下で表示）*/
#wh-print-root { display: none; }

@media print {
	html, body { margin: 0 !important; padding: 0 !important; }
	/* body 直下は印刷ルート以外すべて隠す → 余白なくシートだけ印刷 */
	body > :not(#wh-print-root) { display: none !important; }
	#wh-print-root { display: block !important; }
	/* 複数シートは1枚ずつ改ページ */
	#wh-print-root .wh-sched-sheet { page-break-after: always; }
	#wh-print-root .wh-sched-sheet:last-child { page-break-after: auto; }

	.wh-sched-sheet { box-sizing: border-box; }
	.wh-sched-title { font-size: 17px; padding: 2px 0 6px; }
	table.wh-sched { width: 100%; table-layout: fixed; }
	table.wh-sched th.wh-dow { font-size: 12px; padding: 2px 0; }
	.wh-cell { height: 100px; padding: 1px 2px; }
	.wh-cell-day { font-size: 11px; line-height: 1.2; }
	.wh-nm { font-size: 9.5px; line-height: 1.32; color: #1a3a6b; }
	.wh-sched-foot { font-size: 11px; padding-top: 4px; }

	/* 週の行・セルをページ境界で分割しない／ヘッダーは繰り返さない */
	table.wh-sched tr, table.wh-sched td, table.wh-sched th { page-break-inside: avoid; break-inside: avoid; }
	table.wh-sched thead { display: table-row-group; }

	/* 背景色（ヘッダーのグレー等）を維持 */
	* { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

	@page { size: A4 landscape; margin: 6mm; }
}

/* === 一括印刷ページ === */
.wh-print-bar { display: flex; align-items: center; gap: 16px; margin: 14px 0 16px; }
.wh-print-bar .wh-btn--primary { margin-left: auto; }
.wh-print-cols { display: flex; gap: 16px; flex-wrap: wrap; }
.wh-print-col {
	flex: 1 1 260px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
	padding: 12px 14px;
}
.wh-print-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.wh-print-h label { font-size: 12px; font-weight: 600; color: #5f6368; display: inline-flex; align-items: center; gap: 4px; }
.wh-print-list { max-height: 360px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.wh-pr-item { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 4px; border-radius: 4px; cursor: pointer; }
.wh-pr-item:hover { background: #f1f3f4; }

.wh-print-area { display: none; }