/*
 * 埋め込み用ショートコードのスタイル。.mdesk-embed 配下に閉じ、テーマのスタイルに左右されにくくしている。
 * 色や角丸はテーマ側の CSS で変数を上書きして調整できる：
 *   .mdesk-embed { --mdesk-accent: #c8102e; --mdesk-radius: 0; }
 */
.mdesk-embed {
	--mdesk-accent: #0f2f57;
	--mdesk-text: #1f2937;
	--mdesk-muted: #6b7280;
	--mdesk-line: #e5e7eb;
	--mdesk-bg: #ffffff;
	--mdesk-head-bg: #f3f5f8;
	--mdesk-radius: 10px;
	--mdesk-font: inherit;
	box-sizing: border-box;
	margin: 1.5em 0;
	color: var(--mdesk-text);
	font-family: var(--mdesk-font);
	line-height: 1.6;
}
.mdesk-embed *, .mdesk-embed *::before, .mdesk-embed *::after { box-sizing: border-box; }
.mdesk-embed__title { margin: 0 0 .8em; font-size: 1.4em; }
.mdesk-embed__group { margin: 1.4em 0 .6em; padding-left: .6em; border-left: 4px solid var(--mdesk-accent); font-size: 1.1em; }
.mdesk-embed__note { color: var(--mdesk-muted); }

.mdesk-embed__table { width: 100%; margin: 0; border-collapse: collapse; background: var(--mdesk-bg); border: 1px solid var(--mdesk-line); border-radius: var(--mdesk-radius); overflow: hidden; font-size: .95em; }
.mdesk-embed__table th, .mdesk-embed__table td { padding: .7em 1em; border: 0; border-bottom: 1px solid var(--mdesk-line); text-align: left; vertical-align: top; }
.mdesk-embed__table th { background: var(--mdesk-head-bg); font-weight: 600; white-space: nowrap; }
.mdesk-embed__table tr:last-child td { border-bottom: 0; }

.mdesk-embed__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.mdesk-embed__card { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 14px 16px; background: var(--mdesk-bg); border: 1px solid var(--mdesk-line); border-top: 3px solid var(--mdesk-accent); border-radius: var(--mdesk-radius); }
.mdesk-embed__position { color: var(--mdesk-accent); font-size: .8em; font-weight: 700; }
.mdesk-embed__name { font-size: 1.1em; font-weight: 700; }
.mdesk-embed__kana, .mdesk-embed__meta { color: var(--mdesk-muted); font-size: .85em; }

.mdesk-embed__events { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--mdesk-line); }
.mdesk-embed__event { display: grid; grid-template-columns: 11em 5em 1fr; gap: 4px 12px; align-items: baseline; margin: 0; padding: .8em 0; border-bottom: 1px solid var(--mdesk-line); }
.mdesk-embed__date { font-weight: 700; font-variant-numeric: tabular-nums; }
.mdesk-embed__type { justify-self: start; padding: 0 .6em; border-radius: 999px; background: var(--mdesk-head-bg); color: var(--mdesk-accent); font-size: .8em; }
.mdesk-embed__event .mdesk-embed__meta { grid-column: 3; }

@media (max-width: 600px) {
	.mdesk-embed__table thead { display: none; }
	.mdesk-embed__table, .mdesk-embed__table tbody, .mdesk-embed__table tr, .mdesk-embed__table td { display: block; width: 100%; }
	.mdesk-embed__table tr { padding: .6em 0; border-bottom: 1px solid var(--mdesk-line); }
	.mdesk-embed__table td { padding: .15em 1em; border: 0; }
	.mdesk-embed__table td::before { content: attr(data-label) "："; color: var(--mdesk-muted); font-size: .85em; }
	.mdesk-embed__event { grid-template-columns: 1fr; }
	.mdesk-embed__event .mdesk-embed__meta { grid-column: 1; }
}


/* 一般向け申込フォーム */
.mdesk-form-embed { max-width: 620px; }
.mdesk-embed__lead, .mdesk-embed__info { margin-bottom: 14px; }
.mdesk-embed__info { padding: 12px 16px; background: var(--mdesk-head-bg); border-radius: var(--mdesk-radius); }
.mdesk-embed__closed { padding: 14px 16px; background: #fdecea; color: #7f1d1d; border-radius: var(--mdesk-radius); font-weight: 600; }
.mdesk-embed__error { padding: 12px 16px; margin-bottom: 14px; background: #fdecea; color: #7f1d1d; border-radius: var(--mdesk-radius); }
.mdesk-embed__done { padding: 24px; background: #e7f5ea; border-radius: var(--mdesk-radius); }
.mdesk-embed__done h3 { margin: 0 0 8px; }
.mdesk-f { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.mdesk-f__row { display: flex; flex-direction: column; gap: 5px; }
.mdesk-f__label { font-weight: 700; font-size: .95em; }
.mdesk-f__label em { margin-left: 8px; padding: 1px 7px; border-radius: 4px; background: #c0322b; color: #fff; font-size: .72em; font-style: normal; vertical-align: 2px; }
.mdesk-f__hint { color: var(--mdesk-muted); font-size: .85em; }
.mdesk-f input[type=text], .mdesk-f input[type=email], .mdesk-f input[type=tel], .mdesk-f input[type=number], .mdesk-f input[type=date], .mdesk-f select, .mdesk-f textarea {
	width: 100%; padding: 11px 13px; border: 1px solid var(--mdesk-line); border-radius: 8px; background: #fff; font-size: 16px; font-family: inherit; color: inherit; box-sizing: border-box;
}
.mdesk-f input:focus, .mdesk-f select:focus, .mdesk-f textarea:focus { border-color: var(--mdesk-accent); outline: 2px solid rgba(15, 47, 87, .12); }
.mdesk-f__opts { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 4px; }
.mdesk-f__opts label { display: inline-flex; align-items: center; gap: 6px; }
.mdesk-f__check { display: flex; align-items: center; gap: 8px; }
.mdesk-f__submit { padding: 15px; border: 0; border-radius: 10px; background: var(--mdesk-accent); color: #fff; font-size: 1.05em; font-weight: 700; font-family: inherit; cursor: pointer; }
.mdesk-f__submit:hover { opacity: .92; }

/* 写真・事業の記録 */
.mdesk-embed__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.mdesk-embed__photo { margin: 0; }
.mdesk-embed__photo img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: var(--mdesk-radius); }
.mdesk-embed__photo figcaption { margin-top: 4px; color: var(--mdesk-muted); font-size: .85em; }
.mdesk-embed__albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.mdesk-embed__albumcard { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px; background: var(--mdesk-bg); border: 1px solid var(--mdesk-line); border-radius: var(--mdesk-radius); }
.mdesk-embed__albumcard img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--mdesk-radius); }
