/**
 * ==========================================================
 *  管理画面専用CSS
 *  （どのクローンCMS（news・blog-cms・product-cmsなど）からも
 *   admin_common/ 経由で共通利用する。サイトごとの見た目には触れない。
 *   記事本文・一覧・詳細ページなど「表示側」の見た目は
 *   news/css/common.css・news/css/editor_customize.css（サイトごと）を参照。）
 * ==========================================================
 */

* {
	box-sizing: border-box;
}

body {
	color: #000000;
	margin: 0;
}

a {
	color: #2b6cb0;
}

select {
    font-size: 100%;
    padding: 5px 30px 5px 10px;
    background: #f9f9f9;
    border: 1px solid #cccccc;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

h2 {
	margin: 0;
}

.center_btn {
	text-align: center;
	margin: 20px auto 0 auto;
}

.is-hidden {
	display: none;
}

.error-text {
	color: #c0392b;
}

.wrap {
	max-width: 1200px;
    min-height: calc(100vh - 600px);
	margin: 50px auto;
	padding: 0;
	background-color: #ffffff;
	border-radius: 20px;
}

.wrap.edit_preview.BodyNews {
    width: var(--contents_small_size);
    padding: 0;
}

.btn {
	display: inline-block;
	padding: 4px 20px;
	background: #333333;
	color: #ffffff;
	border-radius: 5px;
	cursor: pointer;
	text-decoration: none;
	font-size: 100%;
	border: solid #000000;
	border-width: 1px;
	transition: 0.2s;
}

.btn-block {
	width: 100%;
}

:hover.btn {
	background: #ffffff;
	color: #000000;
	transition: 0.2s;
}

.btn.secondary {
	background: #eeeeee;
	color: #333333;
	border: solid #999999;
	border-width: 1px;
    margin: 10px auto 0 auto;
}

:hover.btn.secondary {
	background: #ffffff;
}

.article-list .btn.secondary {
    margin: 0 auto 5px auto;
}

.article-list .dal-0730cat {
    top: auto;
    margin: 0 10px 5px 0;
}

:hover.btn.danger {
	background: #c0392b;
	color: #ffffff;
	border: solid #c0392b;
	border-width: 1px;
}

/* ===== ログイン ===== */
/* 現状はuserNikko_login/css/username_login.cssが別途使われており、この.login-box系は
   未使用（将来、管理系の別画面でログインフォームを再利用する場合に備えて残置）。 */
.login-box {
	max-width: 360px;
    min-height: 50vh;
	margin: 80px auto;
	padding: 32px;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.login-box h2 {
	margin: 0 auto 10px auto;
}

.login-box input {
	width: 100%;
	padding: 10px;
	margin: 0 0 12px 0;
	border: solid #cccccc;
	border-width: 1px;
	border-radius: 5px;
}

/* ===== 管理: 一覧 ===== */
.admin-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 16px 0;
	border: solid #cccccc;
	border-width: 0 0 1px 0;
	padding: 0 0 10px 0;
    line-height: 1.2em;
}

.admin-header a {
	margin: 0 0 0 10px;
}

.filter-form {
	margin-bottom: 16px;
}

table.article-list {
	width: 100%;
	border-collapse: collapse;
	background: #ffffff;
}

table.article-list th,
table.article-list td {
	border: solid #cccccc;
	border-width: 1px;
	padding: 10px;
	text-align: center;
	vertical-align: middle;
}

table.article-list th:nth-child(1) { width: 4em;}
table.article-list th:nth-child(2) { width: 6em;}
table.article-list th:nth-child(3) { width: 12em; text-align: center;}
table.article-list th:nth-child(4) { width: 4em;}
table.article-list th:nth-child(5) { width: auto;}
table.article-list th:nth-child(6) { width: 7em;}

table.article-list th {
	background: #f0f0f0;
}

table.article-list td.title {
	text-align: left;
}

table.article-list img.thumb {
	width: 60px;
	height: 60px;
	object-fit: cover;
}

table.article-list img.thumb.thumb-fallback {
	object-fit: contain;
	background: #f2f2f2;
	padding: 8px;
	box-sizing: border-box;
	border-radius: 5px;
}

.status-publish {
	color: #000000;
}

.status-draft {
	color: #cccccc;
}

/* ===== 管理: 編集フォーム ===== */
.edit-field-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 18px 0;
}

.edit-field-table th,
.edit-field-table td {
	border: solid #cccccc;
	border-width: 1px;
	padding: 10px;
	text-align: left;
	vertical-align: middle;
}

.edit-field-table th {
	width: 10em;
	background: #fafafa;
	font-weight: bold;
	white-space: nowrap;
	text-align: center;
}

.edit-field-table input[type=text],
.edit-field-table select {
	padding: 10px;
	border: solid #666666;
	border-width: 1px;
	border-radius: 5px;
	font-size: 100%;
}

.edit-field-table select {
	padding: 10px 30px 10px 10px;
}

.edit-field-table input[type=file] {
	font-size: 100%;
    width: 100%;
    margin: 0 auto;
}

.edit-field-table input[type=text] {
	width: 100%;
}

.edit-field-table input[type=text]#newCatInput {
	width: 50%;
    margin: 0 10px 0 0;
}

.date-field-year {
	margin-right: 4px;
}

.date-field-md {
	margin: 0 4px 0 10px;
}

.label-normal {
	font-weight: normal;
}

.label-block {
	display: block;
}

.editor-hint {
	margin-bottom: 8px;
	font-size: 90%;
	color: #666666;
}

.editor-hint ul {
	margin: 0;
	padding-left: 1.2em;
}

.editor-hint li {
	margin: 0 0 2px 0;
}

.form-row {
	margin: 0 0 18px 0;
}

.form-row label {
	display: inline-block;
	font-weight: bold;
}

.form-row input[type=text],
.form-row select {
	padding: 6px;
	border: solid #cccccc;
	border-width: 1px;
	border-radius: 5px;
}

.cat-list label {
	font-weight: normal;
	margin: 0 12px 0 0;
	min-width: auto;
}

.cat-edit {
	display: inline-block;
	margin: 6px 0 0 0;
}

.cat-edit a {
	margin: 0 4px;
}

.cat-del-form {
	display: inline;
	margin: 0 4px;
}

.cat-del-btn {
	background: none;
	border: none;
	padding: 0;
	color: #2b6cb0;
	cursor: pointer;
	font-size: 100%;
}

.thumb-picker {
	width: 100%;
	min-height: 260px;
	border: dashed #bbbbbb;
	border-width: 1px;
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #999999;
	position: relative;
	overflow: hidden;
	background: #fafafa;
	margin: 5px auto;
}

.thumb-picker img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 直ファイル欄：ファイル選択直後のプレビュー（editor.js initDirectFilePicker()が生成） */
.directFilePreview {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px 0;
}

.directFilePreviewThumb {
	max-width: 50%;
	max-height: 350px;
	object-fit: contain;
	border: 1px solid #dddddd;
	border-radius: 5px;
	background: #fafafa;
}

.directFilePreviewIcon {
	width: 40px;
	object-fit: contain;
}

/* ===== エディタ ===== */
.editor-toolbar-wrap {
	position: sticky;
	top: 0;
	z-index: 10;
	padding: 50px 0 0 0;
	background: #ffffff; /* body背景色と同じ */
}

.editor-toolbar {
	display: flex;
	gap: 4px;
	align-items: center;
	background: #f7f7f7;
	border: solid #cccccc;
	border-width: 1px;
	border-radius: 5px 5px 0 0;
	padding: 6px;
	flex-wrap: wrap;
	box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

.insert-plus-wrap {
	position: relative;
	display: inline-block;
}

.color-btn-icon {
	display: inline-block;
	font-weight: bold;
	border-bottom: solid #cc0000;
	border-bottom-width: 3px;
	line-height: 1;
	padding-bottom: 1px;
}

.icon-svg {
	vertical-align: middle;
}

.editor-toolbar button,
.editor-toolbar select {
	border: none;
	border-width: 0;
	background: transparent;
	padding: 6px 8px;
	cursor: pointer;
	border-radius: 5px;
	font-size: 14px;
}

.editor-toolbar button:hover {
	background: #e6e6e6;
}

.editor-body {
	min-height: 320px;
	border: solid #cccccc;
	border-width: 1px;
	border-top: none;
	border-top-width: 0;
	border-radius: 0 0 5px 5px;
	padding: 16px;
	background: #ffffff;
	line-height: 1.8;
	font-size: 15px;
}

.editor-body:focus {
	outline: none;
}

.editor-body img,
.editor-body video {
	width: 100%;
	height: auto;
	display: block;
	cursor: default;
}

/* 画像・動画自体にはmarginを持たせない（display:tableのラップ内で暗黙のtable-cellが
   生成され、marginの影響で実際のサイズより枠が大きくなり削除ボタンの位置がズレるため）。
   上下の余白は代わりにラップ側(.media-wrap)に持たせる。 */
.editor-body .media-wrap {
	margin: 8px 0;
}

/* 縦長(高さ>幅)の画像・動画は横長と同じwidth:100%だと縦に間延びしすぎるため、
   高さ基準(max-height:70vh)で縮小し、幅は成り行き(auto)にする。
   縦長かどうかはeditor.js側で読み込み後にimg-portrait/video-portraitクラスを付けて判定する。 */
.editor-body img.img-portrait,
.editor-body video.video-portrait {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 70vh;
}

/* 縦長の画像・動画は幅が本文いっぱいまで広がらないため、削除ボタン用のラップも
   実サイズに合わせて中央寄せする。上下marginは.media-wrapと同じ8pxをここでも
   明示している（display/max-width/横方向のautoだけの上書きにはしていない）。 */
.editor-body .media-wrap:has(> img.img-portrait),
.editor-body .media-wrap:has(> video.video-portrait) {
	display: table;
	margin: 8px auto;
	max-width: 100%;
}

.editor-body audio {
	max-width: 100%;
	display: block;
	margin: 8px 0;
}

.editor-body blockquote {
	border-left: solid #cccccc;
	border-left-width: 3px;
	margin: 8px 0 8px 8px;
	padding: 0 0 0 12px;
	color: #666666;
}

.editor-body pre {
	background: #f4f4f4;
	padding: 10px;
	border-radius: 5px;
	overflow-x: auto;
}

.editor-body hr {
	height: 1px;
	background: #cccccc;
	border: none;
	border-width: 0;
	margin: 5px 0;
}

textarea:not(:placeholder-shown).editor-source {
	width: 100%;
	min-height: 320px;
	border: solid #cccccc;
	border-width: 1px;
	border-top: none;
	border-top-width: 0;
	border-radius: 0 0 5px 5px;
	padding: 16px;
	background: #1e1e1e!important;
	color: #d4d4d4;
	line-height: 1.6;
	font-size: 13px;
	font-family: Menlo, Consolas, monospace;
	box-sizing: border-box;
	resize: vertical;
}

.editor-source:focus {
	outline: none;
}

.insert-plus {
	position: absolute;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: solid #cccccc;
	border-width: 1px;
	background: #ffffff;
	color: #666666;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	z-index: 5;
}

.insert-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin: 4px 0 0 0;
	background: #ffffff;
	border: solid #cccccc;
	border-width: 1px;
	border-radius: 5px;
	box-shadow: 0 4px 14px rgba(0,0,0,.12);
	padding: 6px 0;
	min-width: 140px;
	display: none;
	z-index: 6;
}

.insert-menu div {
	padding: 8px 14px;
	cursor: pointer;
	font-size: 14px;
}

.insert-menu div:hover {
	background: #f2f2f2;
}

/* ---- 文字カラーパレット（Pickr） ---- */
/* スウォッチ・ピッカー・決定ボタンなどのUIはPickr本体(nanoテーマ)が描画するため、
   こちら側で用意するのはツールバーボタン(#colorBtn)の見た目のみでよい。 */
.pcr-app {
	z-index: 20;
}

/* 適用・解除の行はセンター揃えにする。 */
.pcr-app .pcr-interaction {
	justify-content: center;
}

/* HEXA/RGBAの切替ボタンの直後で必ず改行し、適用・解除ボタンを次の行にまとめる。
   （flexboxはwrapするだけでは中身が入りきる限り折り返さないため、
   疑似要素にorderを与えて改行位置を強制する定番の手法を使う） */
.pcr-app .pcr-interaction .pcr-result,
.pcr-app .pcr-interaction .pcr-type {
	order: 1;
}
.pcr-app .pcr-interaction::after {
	content: '';
	order: 2;
	flex-basis: 100%;
	height: 0;
}
.pcr-app .pcr-interaction .pcr-save,
.pcr-app .pcr-interaction .pcr-cancel,
.pcr-app .pcr-interaction .pcr-clear {
	order: 3;
}

/* 現在色のプレビュー円は、opacityコンポーネントを無効にしているのに
   グリッド上は色相スライダー＋不透明度スライダーの2行分（+行間ギャップ）を
   占有したままになっており、align-itemsだけでは天地中央が揃いきらない。
   色相スライダーと同じ1行だけを占めるようにグリッド範囲そのものを変更する。 */
.pcr-app[data-theme=nano] .pcr-selection .pcr-color-preview {
	grid-area: 2 / 1 / 3 / 1;
	align-items: center;
}

/* 色相スライダーを長く（右まで）伸ばす。
   プレビュー円の列を狭め、スライダー側の列の取り分を増やし、
   スライダー右側の余白（margin）も詰める。 */
.pcr-app[data-theme=nano] .pcr-selection {
	grid-template-columns: 1fr 8fr;
}

.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser {
	margin: 0 15px;
}

/* HEXA/RGBA切り替え・決定・解除のボタンデザインを統一する。
   デフォルトは同じグレー系、ホバーで青地に白文字、選択中/フォーカス時は青いフォーカスリング。 */
.pcr-app .pcr-interaction .pcr-type,
.pcr-app .pcr-interaction .pcr-save,
.pcr-app .pcr-interaction .pcr-clear,
.pcr-app .pcr-interaction .pcr-cancel {
	letter-spacing: .07em;
	font-size: .75em;
	text-align: center;
	cursor: pointer;
	color: #000000;
	background: #f1f3f4;
	border-radius: .15em;
	transition: all .15s;
	padding: .45em .5em;
	margin: .75em .2em 0 .2em;
	filter: none;
}

.pcr-app .pcr-interaction .pcr-type:hover,
.pcr-app .pcr-interaction .pcr-save:hover,
.pcr-app .pcr-interaction .pcr-clear:hover,
.pcr-app .pcr-interaction .pcr-cancel:hover {
	color: #ffffff;
	background: #4285f4;
	filter: none;
}

.pcr-app .pcr-interaction .pcr-type.active,
.pcr-app .pcr-interaction .pcr-type:focus {
	box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .85), 0 0 0 3px rgba(66, 133, 244, .75);
}

.pcr-app .pcr-interaction .pcr-save:focus,
.pcr-app .pcr-interaction .pcr-clear:focus,
.pcr-app .pcr-interaction .pcr-cancel:focus {
	box-shadow: none;
}

.pcr-swatches .pcr-swatch-add {
	width: calc(1.75em - 5px);
	height: calc(1.75em - 5px);
	margin: 2.5px;
	padding: 0;
	border: dashed #999999;
	border-width: 1px;
	border-radius: .15em;
	background: #ffffff;
	color: #666666;
	font-size: 1em;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.pcr-swatches .pcr-swatch-add:hover {
	background: #f2f2f2;
}

.pcr-swatches .pcr-swatch-add::before,
.pcr-swatches .pcr-swatch-add::after {
	content: none;
	background: none;
}

.swatch-delete-popup {
	z-index: 10001;
	box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.swatch-delete-popup button {
	background: #f1f3f4;
	color: #000000;
	border: solid #cccccc;
	border-width: 1px;
	padding: 2px 10px;
	border-radius: 5px;
	font-size: 13px;
	cursor: pointer;
}

.swatch-delete-popup button:hover {
	text-decoration: none;
	background: #4285f4;
	color: #ffffff;
}

.swatch-delete-popup-notice {
	padding: 4px 10px;
	font-size: 13px;
	color: #000000;
	background: #ffffff;
	white-space: nowrap;
	border-radius: 5px;
}

/* ---- 画面中央に出す自作モーダル（alert/confirm/promptの置き換え。editor.js） ---- */
.editor-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .4);
	z-index: 10010;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.editor-modal-box {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .2);
	padding: 20px 24px;
	width: 100%;
	max-width: 400px;
	box-sizing: border-box;
}

.editor-modal-box.modalURLlink {
	max-width: 800px;
}


.editor-modal-message {
	margin: 0 0 16px 0;
	font-size: 14px;
	line-height: 1.6;
	color: #000000;
	white-space: pre-wrap;
}

.editor-modal-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: .5em .6em;
	margin: 0 0 16px 0;
	border: 1px solid #cccccc;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
}

textarea.editor-modal-input {
	min-height: 6em;
	resize: vertical;
}

.editor-link-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
	margin: 0 0 16px 0;
}

.editor-link-row .editor-modal-input {
	margin: 0;
}

.editor-link-row .editor-link-url {
	flex: 3 1 0;
	min-width: 0;
}

.editor-link-row .editor-link-target {
	flex: 1 1 0;
    min-width: 120px;
}

.editor-modal-actions {
    text-align: center;
}

.editor-modal-btn {
	letter-spacing: .07em;
	font-size: .8em;
	text-align: center;
	cursor: pointer;
	color: #000000;
	background: #f1f3f4;
	border: none;
	border-radius: 4px;
	padding: .55em 1.1em;
	transition: all .15s;
    margin: 0 5px;
}

.editor-modal-btn:hover {
	background: #dddddd;
}

.editor-modal-btn-primary {
	background: #4285f4;
	color: #ffffff;
}

.editor-modal-btn-primary:hover {
	background: #2f6fdb;
}

.delete_message {
    margin: 0 auto 40px auto;
    text-align: center;
}

/* コンテンツ毎のレイアウト-rootのカスタマイズにも記載する */
.editor-body table, .detail-body table {
    width: auto;
    border-collapse: collapse;
    margin: 12px 0;
    border: solid #cccccc;
    border-width: 1px 0 0 1px;
}
.editor-body table td, .editor-body table th,
.detail-body table td, .detail-body table th {
    width: auto;
    border: solid #cccccc;
    border-width: 0 1px 1px 0;
    padding: 10px 20px;
}


.editor-body table hr,
.detail-body table hr {
    border: #cccccc solid;
    height: 1px;
    border-width: 0 0 1px 0;
}

.BodyRecruitment table {
    width: 100%;
}

.BodyRecruitment table tr td:first-child {
    width: 10em;
    text-align: center;
    vertical-align: top;
    background-color: #f9f9f9;
}

.BodyRecruitment table tr td .embed-block {
    margin: 5px auto 30px;
}

.BodyRecruitment .newsTopBox.viewPC {
    display: block;
    padding: 0;
}

/*.newsTopBox img {
    width: 100%;
}*/

/* 1200px以下：.wrapの左右余白を縮める */
@media only screen and (max-width: 1200px) {
	.wrap {
		margin: 50px 25px;
		padding: 25px;
	}
}

@media only screen and (max-width: 550px) {
	.edit-field-table th,
	.edit-field-table td {
		border: solid #cccccc;
		border-width: 1px 1px 0 1px;
		display: block;
		width: 100%;
	}

	.edit-field-table tr:last-child td {
		border: solid #cccccc;
		border-width: 1px;
	}
    
 /* コンテンツ毎のレイアウト-rootのカスタマイズにも記載する */
.BodyRecruitment table tr td,
.BodyRecruitment table tr td:first-child {
    display: block;
    width: 100%;
    text-align: left;
}
    
.BodyRecruitment table tr td:first-child {
    text-align: center;
}
    
}