@charset "UTF-8";
/*******************************************************************************
  adiary 管理画面の部品のCSS
	base.cssから、管理画面でだけ使う部品（記事の編集、メディア管理、
	デザイン編集、ツリーなど）を分けたもの。
	管理画面のフレーム（_frame_admin）と、公開画面のフレーム（_frame）の
	システムモード（デザイン編集）で読み込む。
	デザイン編集の中のiframe（design/art_sample）はテーマで表示するので、
	システムモードにせずにスケルトンで読み込む。
	管理画面の見た目（配置や色）は admin.css に書く。
*******************************************************************************/
/*--------------------------------------------------------------------
●編集画面
--------------------------------------------------------------------*/
#open-draft-buttons {
	display:		inline-block;
}
/* 記事タグ */
article.edit span.tag {
	font-size:		9pt;
	display:		inline-block;
	background-color:	#ccc;
	padding:		0px 4px;
	margin-right:		6px;
}
/* タグ追加ダイアログ */
#tag-select-form #input-new-tag {
	width:			100%;
	box-sizing:		border-box;
}
.ui-dialog ul#tag-candidates {
	list-style:		none;
	margin:			4px 0;
	padding:		0;
	max-height:		16em;
	overflow-y:		auto;
}
#tag-candidates:empty {
	display:		none;
}
#tag-candidates li {
	display:		flex;
	justify-content:	space-between;
	padding:		2px 6px;
	cursor:			pointer;
}
#tag-candidates li:hover {
	background-color:	#e4e8f4;
}
#tag-candidates li.selected {
	background-color:	#c8d4f8;
}
#tag-candidates li .qt {
	color:			#888;
	margin-left:		1em;
}
#tag-candidates li.new-tag {
	color:			#36c;
}
#tag-select-details {
	margin-top:		0.5em;
}
#tag-select-details summary {
	cursor:			pointer;
}
/* 更新履歴ダイアログ */
#revision-dialog .rev-wrap {
	display:		flex;
	gap:			8px;
	height:			60vh;
}
.ui-dialog ul#revision-list {
	list-style:		none;
	margin:			0;
	padding:		0;
	width:			220px;
	flex-shrink:		0;
	overflow-y:		auto;
	border:			1px solid #ccc;
}
#revision-list li {
	padding:		4px 6px;
	border-bottom:		1px solid #e4e4e4;
	cursor:			pointer;
	font-size:		9pt;
}
#revision-list li:hover {
	background-color:	#e4e8f4;
}
#revision-list li.selected {
	background-color:	#c8d4f8;
}
#revision-list li.rev-last {
	border-bottom:		3px double #c0c0c0;
}
#revision-list .rev-last-label {
	display:		block;
	font-weight:		bold;
	color:			#36c;
}
#revision-list li.rev-empty {
	cursor:			default;
	background-color:	transparent;
}
#revision-list .rev-len {
	float:			right;
	color:			#888;
}
#revision-list .rev-title {
	color:			#555;
	overflow:		hidden;
	text-overflow:		ellipsis;
	white-space:		nowrap;
}
#revision-view {
	flex-grow:		1;
	min-width:		0;
	display:		flex;
	flex-direction:		column;
}
#revision-view .rev-mode {
	font-size:		9pt;
	margin-bottom:		4px;
}
#revision-title {
	font-weight:		bold;
}
#revision-title .rev-note {
	font-weight:		normal;
	font-size:		9pt;
	color:			#888;
}
#revision-body,
#conflict-body {
	flex-grow:		1;
	overflow:		auto;
	margin:			4px 0 0 0;
	padding:		4px;
	border:			1px solid #ccc;
	background-color:	#fff;
	font-size:		9pt;
	white-space:		pre-wrap;
	word-break:		break-all;
}
#revision-body .rev-del,
#conflict-body .rev-del {
	display:		block;
	background-color:	#fdd;
}
#revision-body .rev-add,
#conflict-body .rev-add {
	display:		block;
	background-color:	#dfd;
}
#revision-body .rev-ctx,
#conflict-body .rev-ctx {
	display:		block;
	color:			#666;
}
#revision-body .rev-skip,
#conflict-body .rev-skip {
	display:		block;
	color:			#aaa;
}
#conflict-body {
	max-height:		50vh;
}
#conflict-dialog p .rev-del {
	background-color:	#fdd;
}
#conflict-dialog p .rev-add {
	background-color:	#dfd;
}

/*--------------------------------------------------------------------
●メディア管理
--------------------------------------------------------------------*/
ul.dynatree-container a {
	font-weight:		normal;
}
.side-folder-tree ul.dynatree-container {
	min-height:		300px;
	margin-bottom:		2px;
}
#media-folder-view {
	margin-top:		4px;
	min-height:		260px;
	margin-bottom:		8px;
	clear:			both;
}

#media-folder-view a {
	margin:			1px;
	display:		inline-block;
}

/* サムネイル表示。縦長や横長の画像も見やすく押しやすいよう、同じ大きさのマスに全体を収める（切り取らない）。
   マスの大きさは固定で、列の数は幅に合わせて変わる（Lyndbaum 0 のメディアの一覧と同じ）。
   選択はimgに付くので、マスの枠や余白もimgに付ける */
#media-folder-view.thumb-view {
	display:		grid;
	grid-template-columns:	repeat(auto-fill, minmax(8.5rem, 1fr));
	gap:			0.5rem;
}
#media-folder-view.thumb-view a {
	margin:			0;
	display:		block;
}
#media-folder-view img {
	display:		block;
	box-sizing:		border-box;
	width:			100%;
	height:			calc(7rem + 0.7rem + 2px);	/* 画像7rem＋余白＋枠 */
	padding:		0.35rem;
	border:			1px solid var(--admin-border, #c3c4c7);
	background-color:	var(--admin-bg, #f0f0f1);
	object-fit:		contain;
}
#media-folder-view img.selected {
	outline:		3px solid var(--admin-link, #2271b1);
	outline-offset:		-1px;
}
/* 動画（media.js の is_video_file）。サムネイルだけでは静止画と見分けられないので、右下に再生の印を重ねる。
   印は記事の動画のサムネイル（theme/base.css の a.video-thumb::after）と同じSVG。
   クリックやドラッグはimgで受けるので、印はイベントを受けない */
#media-folder-view.thumb-view a.is-video {
	position:		relative;
}
#media-folder-view.thumb-view a.is-video::after {
	content:		"";
	position:		absolute;
	right:			calc(0.35rem + 1px);
	bottom:			calc(0.35rem + 1px);
	width:			22px;
	height:			22px;
	border-radius:		50%;
	background:		rgba(0,0,0,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat 55% center / 14px 14px;
	pointer-events:		none;
}
/* 名前で絞り込んで隠したファイル（media.js の apply_filter）。表示形式ごとの display より強くする */
#media-folder-view.thumb-view a.filtered-out,
#media-folder-view.name-view  a.filtered-out {
	display:		none;
}
/* ファイル名一覧 */
#media-folder-view.name-view {
	font-size:		14px;
}
#media-folder-view.name-view a {
	display:		block;
	width:			100%;
	padding:		1px;
	margin-top:		1px;
}
#media-folder-view.name-view span.fileline {
	display:		block;
}
#media-folder-view.name-view span.fileline.selected {
	background-color:	#fcc;
}
#media-folder-view.name-view span.filename {
	width:			calc(100% - 230px);
	display:		inline-block;
	vertical-align:		middle;
}
#media-folder-view.name-view span.filedate {
	width:			160px;
	display:		inline-block;
	vertical-align:		middle;
}
#media-folder-view.name-view span.filesize {
	width:			64px;
	display:		inline-block;
	vertical-align:		middle;
	text-align:		right;
}
#adiary-body #media-dnd-name-view {
	color:			#000;
	background-color:	#fff;
	padding:		6px;
}
#media-dnd-name-view span {
	display:		block;
}
/* ファイルなし */
#media-folder-view div.file-not-found {
	font-size:		12pt;
	font-weight:		bold;
	padding: 		1em 1em 0 1em;
}

/* メディア管理のタイトル */
#media h1 * {
	vertical-align:		middle;
}
#current-folder {
	margin-left:		4px;
}
#current-count {
	margin-left:		4px;
	font-weight:		normal;
}
#name-filter {
	width:			12em;
}

/* メディア管理のヘッダ */
#media-header, #media-header select {
	font-size:		11pt;
}
#media-header div {
	display:		inline-block;
}
#media-header div.view-option {
	float:			right;
}

/* メディア管理のメイン部 */
#iframe-upload-form {
	width:			100%;
	border:			none;
}
#file-btn-div {
	margin-bottom:		6px;
}
#upload-information-view {
	font-size:		90%;
	line-height:		130%;
	margin-bottom:		1em;
}
#selected-files li:hover {
	background-color:	#e8e8e8;
	cursor:			pointer;
}

/*--------------------------------------------------------------------
●デザイン編集
--------------------------------------------------------------------*/
.design-module-edit {
	min-height:		18px;
}
.main div.design-module-edit {
	width:			100%;
}
.design-module-edit {
	position:		relative;
}
.design-module-edit.display {
	background-color:	#fcc;
}
.design-module-edit:hover:not(.hoverstop) {
	background-color:	#faa;
}
.module-edit-header {
	position:		absolute;
	top:			0;
	right:			0;
	padding:		0;
	z-index:		10;
	text-align:		right;

	font-size:		1px;
	line-height:		100%;
}
/* モジュール右上アイコン */
.module-edit-header span.ui-icon {
	margin-left:		1px;
	border:			1px solid #333;
	background-color:       #fff;
}
.module-edit-header span.ui-icon:hover {
	background-color:       #eee;
}
#body .module-edit-header * {
	vertical-align:		top;
}
/* テーマ（lyndbaumなど）がborder-boxにしても、アイコンの16pxを枠の内側に残す。
   デザイン編集のiframeはテーマで表示するので、角丸も元のとおりにする */
#body .module-edit-header span.ui-icon {
	box-sizing:		content-box;
	border-radius:		4px;
}
.dem-module {
	margin-top:		0.5em;
	margin-bottom:		0.5em;
}

/*--------------------------------------------------------------------
●システム画面UI
--------------------------------------------------------------------*/
/* import/export画面等 */
.js-accordion h2 {
	cursor:			pointer;
}

/* dynatree */
ul.dynatree-container {
	min-height:		20px;
	line-height:		1.3;
}

#body ul.dynatree-container ul
{
	padding: 0 0 0 18px;
	margin: 0;
}
#body ul.dynatree-container li
{
	margin: 0;
	padding: 1px 0 0 0;
}
span.dynatree-node a {
	padding:	1px;
}
span.dynatree-node a:focus {
	outline:	none;	/* for GC */
}
span.dynatree-icon,
ul.dynatree-container img {
	margin-left:	0px;
}

#media-folder-tree ul.dynatree-container > li > ul {
	padding-left:	3px;
}

/* サイドバーフォルダーツリー */
.side-folder-tree ul {
	line-height:		110%;
}
.side-folder-tree li * {
	vertical-align:		middle;
}

/*--------------------------------------------------------------------
●jQuery UI
--------------------------------------------------------------------*/
/* sortable */
.dynatree-title,
.ui-sortable-handle {
	cursor:			grab;
}
.ui-sortable-handle.ui-sortable-helper {
	cursor:			grabbing;
}
.ui-sortable-handle .no-drag {
	cursor:			auto;
}
/* 並べ替えのハンドル（adiary.sortableのopt.handleに指定する。リンク集の設定画面など）。
   縦に並んだ6つの点を、画像のファイルを使わずにCSSで出す。にじまないよう、点は1pxの格子に合わせた2pxの四角 */
.sort-handle {
	width:			1.5em;
	min-width:		1.5em;
	cursor:			grab;
	background:		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cg fill='%23888' shape-rendering='crispEdges'%3E%3Crect x='2' y='2' width='2' height='2'/%3E%3Crect x='6' y='2' width='2' height='2'/%3E%3Crect x='2' y='7' width='2' height='2'/%3E%3Crect x='6' y='7' width='2' height='2'/%3E%3Crect x='2' y='12' width='2' height='2'/%3E%3Crect x='6' y='12' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 10px 16px;
}
.ui-sortable-helper .sort-handle {
	cursor:			grabbing;
}

/*--------------------------------------------------------------------
●その他
--------------------------------------------------------------------*/
/* 管理メニュー関連 */
ul.menu {
	margin-top:		1em;
	margin-bottom:		1em;
}

/*--------------------------------------------------------------------
●画面内のタブ（_sub/menu_tree）
--------------------------------------------------------------------*/
/* 管理画面の変数（admin.css）が無い画面（公開画面のフレームで出す画面）でも出せるよう、既定の色を書く */
nav.admin-tabs {
	margin:			0 0 1rem;
}
nav.admin-tabs:not(:has(li)),
nav.admin-tabs ul:not(:has(li)) {
	display:		none;
}
nav.admin-tabs ul.tabs {
	display:		flex;
	flex-wrap:		wrap;
	gap:			0.25rem;
	list-style:		none;
	margin:			0;
	padding:		0;
	border-bottom:		1px solid var(--admin-border, #c3c4c7);
}
nav.admin-tabs ul.tabs + ul.tabs {
	margin-top:		0.5rem;
}
nav.admin-tabs li {
	margin:			0 0 -1px;
}
nav.admin-tabs li > a,
nav.admin-tabs li > span {
	display:		block;
	padding:		0.35rem 0.9rem;
	border:			1px solid var(--admin-border, #c3c4c7);
	background-color:	#dcdcde;
	color:			#50575e;
	text-decoration:	none;
	font-weight:		bold;
}
nav.admin-tabs li > a:hover {
	background-color:	#fff;
	color:			var(--admin-link-hover, #135e96);
}
nav.admin-tabs li.current > a,
nav.admin-tabs li.current > span {
	background-color:	var(--admin-bg, #f0f0f1);
	border-bottom-color:	var(--admin-bg, #f0f0f1);
	color:			var(--admin-fg, #1d2327);
}
/* 上の段（ディレクトリ）は小さく */
nav.admin-tabs ul.tabs-dir li > a,
nav.admin-tabs ul.tabs-dir li > span {
	padding:		0.2rem 0.75rem;
	font-weight:		normal;
	font-size:		90%;
}

/*--------------------------------------------------------------------
●スマホ
--------------------------------------------------------------------*/
/* システムモードでは sidebar 非表示 */
/* メディア管理 */
.ui-dialog #media-folder-tree ul {
	margin:			0;
}
