/**
 * 固定ページ「施工実績一覧（表型）」
 *
 * @package Sankoudenki
 */

.sankoudenki-works-list-page {
	--works-list-border: #e2e8f0;
	--works-list-surface: #f8fafc;
	--works-list-text: #475569;
	--works-list-heading: #0f172a;
	--works-list-primary: #155c89;
	/* 列幅（表100%）: 竣工10 / 発注30 / 件名50 / 場所10 */
	--works-list-col-date: 10%;
	--works-list-col-orderer: 30%;
	--works-list-col-project: 50%;
	--works-list-col-location: 10%;
}

.doc-prose--works-list {
	--works-list-col-date: 10%;
	--works-list-col-orderer: 30%;
	--works-list-col-project: 50%;
	--works-list-col-location: 10%;
	color: var(--works-list-text);
	line-height: 1.75;
}

.doc-prose--works-list p,
.doc-prose--works-list .works-list-lead {
	font-size: var(--text-standard-size);
	line-height: var(--text-standard-lh);
}

.doc-prose--works-list .works-list-lead {
	margin: 0 0 clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
	color: var(--works-list-text);
}

.doc-prose--works-list .works-list-section + .works-list-section {
	border-top: 1px solid var(--works-list-border);
	padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.doc-prose--works-list .works-list-section > .is-style-doc-subhead,
.doc-prose--works-list .works-list-section > h2.is-style-doc-subhead {
	margin-top: 0;
}

.doc-prose--works-list .works-list-table-wrap {
	margin-top: 1rem;
}

.doc-prose--works-list .works-list-table-wrap figure.wp-block-table,
.doc-prose--works-list .works-list-table-wrap .wp-block-table.is-style-works-record-table {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--works-list-border);
	background: #fff;
}

.doc-prose--works-list table.works-list-table,
.doc-prose--works-list .is-style-works-record-table table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	margin: 0;
	font-size: var(--text-standard-size);
	line-height: var(--text-standard-lh);
	background: #fff;
}

@media (max-width: 767px) {
	.doc-prose--works-list table.works-list-table,
	.doc-prose--works-list .is-style-works-record-table table {
		min-width: 42rem;
	}
}

@media (min-width: 768px) {
	.doc-prose--works-list .works-list-table-wrap figure.wp-block-table,
	.doc-prose--works-list .works-list-table-wrap .wp-block-table.is-style-works-record-table {
		overflow-x: visible;
	}

	.doc-prose--works-list table.works-list-table,
	.doc-prose--works-list .is-style-works-record-table table,
	.doc-prose--works-list .is-style-works-record-table table {
		min-width: 0;
		table-layout: fixed;
		width: 100%;
	}
}

.doc-prose--works-list .works-list-table thead th,
.editor-styles-wrapper .works-list-table thead th {
	background-color: var(--works-list-primary);
	color: #fff;
	font-weight: 700;
	border-top: 1px solid var(--works-list-primary);
	border-bottom: 1px solid var(--works-list-primary);
	border-left: 1px solid rgba(255, 255, 255, 0.45);
	border-right: 1px solid rgba(255, 255, 255, 0.45);
	padding: 0.75rem 0.85rem;
	vertical-align: middle;
	text-align: center;
	white-space: nowrap;
}

.doc-prose--works-list .works-list-table thead th:first-child,
.editor-styles-wrapper .works-list-table thead th:first-child {
	border-left-color: var(--works-list-primary);
}

.doc-prose--works-list .works-list-table thead th:last-child,
.editor-styles-wrapper .works-list-table thead th:last-child {
	border-right-color: var(--works-list-primary);
}

.doc-prose--works-list .works-list-table tbody td {
	border: 1px solid var(--works-list-border);
	padding: 0.7rem 0.85rem;
	vertical-align: top;
	color: var(--works-list-text);
	background: #fff;
}

.doc-prose--works-list .works-list-table tbody tr:nth-child(even) td {
	background-color: var(--works-list-surface);
}

.doc-prose--works-list .works-list-table thead th:nth-child(1),
.doc-prose--works-list .works-list-table tbody td:nth-child(1),
.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(1),
.editor-styles-wrapper .works-list-table thead th:nth-child(1),
.editor-styles-wrapper .works-list-table tbody td:nth-child(1),
.editor-styles-wrapper .is-style-works-record-table :is(thead th, tbody td):nth-child(1),
.doc-prose--works-list .works-list-table__date {
	box-sizing: border-box;
	width: var(--works-list-col-date);
	min-width: 0;
	max-width: var(--works-list-col-date);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.doc-prose--works-list .is-style-works-record-table col.works-list-col--date,
.editor-styles-wrapper .is-style-works-record-table col.works-list-col--date {
	width: var(--works-list-col-date);
}

.doc-prose--works-list .is-style-works-record-table col.works-list-col--orderer,
.editor-styles-wrapper .is-style-works-record-table col.works-list-col--orderer {
	width: var(--works-list-col-orderer);
}

.doc-prose--works-list .is-style-works-record-table col.works-list-col--project,
.editor-styles-wrapper .is-style-works-record-table col.works-list-col--project {
	width: var(--works-list-col-project);
}

.doc-prose--works-list .is-style-works-record-table col.works-list-col--location,
.editor-styles-wrapper .is-style-works-record-table col.works-list-col--location {
	width: var(--works-list-col-location);
}

.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(2),
.doc-prose--works-list .works-list-table :is(thead th, tbody td):nth-child(2),
.editor-styles-wrapper .is-style-works-record-table :is(thead th, tbody td):nth-child(2),
.editor-styles-wrapper .works-list-table :is(thead th, tbody td):nth-child(2) {
	box-sizing: border-box;
	width: var(--works-list-col-orderer);
	min-width: 0;
	max-width: var(--works-list-col-orderer);
	overflow-wrap: anywhere;
	word-break: break-word;
}

.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(3),
.doc-prose--works-list .works-list-table :is(thead th, tbody td):nth-child(3),
.editor-styles-wrapper .is-style-works-record-table :is(thead th, tbody td):nth-child(3),
.editor-styles-wrapper .works-list-table :is(thead th, tbody td):nth-child(3) {
	width: var(--works-list-col-project);
	max-width: var(--works-list-col-project);
}

.doc-prose--works-list .works-list-table thead th:nth-child(4),
.doc-prose--works-list .works-list-table tbody td:nth-child(4),
.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(4),
.editor-styles-wrapper .works-list-table thead th:nth-child(4),
.editor-styles-wrapper .works-list-table tbody td:nth-child(4),
.editor-styles-wrapper .is-style-works-record-table :is(thead th, tbody td):nth-child(4),
.doc-prose--works-list .works-list-table__location {
	box-sizing: border-box;
	width: var(--works-list-col-location);
	min-width: 0;
	max-width: var(--works-list-col-location);
	white-space: nowrap;
}

.doc-prose--works-list .is-style-works-record-table table,
.editor-styles-wrapper .is-style-works-record-table table {
	width: 100%;
	border-collapse: collapse;
}

@media (max-width: 767px) {
	.doc-prose--works-list {
		--works-list-col-date: 5.5rem;
		--works-list-col-orderer: 13.5rem;
		--works-list-col-project: 22.5rem;
		--works-list-col-location: 5.75rem;
	}

	.doc-prose--works-list .is-style-works-record-table table,
	.doc-prose--works-list table.works-list-table,
	.editor-styles-wrapper .is-style-works-record-table table {
		table-layout: fixed;
		width: 47.25rem;
		min-width: 47.25rem;
		max-width: none;
	}

	.doc-prose--works-list .is-style-works-record-table col.works-list-col--date,
	.doc-prose--works-list .is-style-works-record-table col.works-list-col--location {
		width: auto;
	}

	.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(1),
	.doc-prose--works-list .works-list-table :is(thead th, tbody td):nth-child(1) {
		width: 5.5rem;
		min-width: 5.5rem;
		max-width: 5.5rem;
		padding-inline: 0.5rem;
	}

	.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(4),
	.doc-prose--works-list .works-list-table :is(thead th, tbody td):nth-child(4) {
		width: 5.75rem;
		min-width: 5.75rem;
		max-width: 5.75rem;
		padding-inline: 0.5rem;
	}

	.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(2),
	.doc-prose--works-list .works-list-table :is(thead th, tbody td):nth-child(2) {
		width: 13.5rem;
		min-width: 13.5rem;
		max-width: 13.5rem;
	}

	.doc-prose--works-list .is-style-works-record-table :is(thead th, tbody td):nth-child(3),
	.doc-prose--works-list .works-list-table :is(thead th, tbody td):nth-child(3) {
		width: 22.5rem;
		min-width: 22.5rem;
		max-width: 22.5rem;
	}

	.doc-prose--works-list .works-list-table thead th:nth-child(1),
	.doc-prose--works-list .works-list-table thead th:nth-child(4),
	.doc-prose--works-list .is-style-works-record-table thead th:nth-child(1),
	.doc-prose--works-list .is-style-works-record-table thead th:nth-child(4) {
		font-size: clamp(0.8125rem, 0.78rem + 0.12vw, 0.875rem);
		line-height: 1.35;
		white-space: normal;
	}
}

.doc-prose--works-list .works-list-table-scroll-hint {
	display: none;
	margin: 0.5rem 0 0;
	font-size: clamp(0.8125rem, 0.78rem + 0.12vw, 0.875rem);
	color: var(--works-list-text);
	text-align: right;
}

@media (max-width: 767px) {
	.doc-prose--works-list .works-list-table-scroll-hint,
	.editor-styles-wrapper .works-list-table-scroll-hint {
		display: block;
	}
}

/* ブロックエディター（ビジュアル編集） */
.editor-styles-wrapper .works-list-lead {
	margin: 0 0 2rem;
	color: var(--works-list-text, #475569);
}

.editor-styles-wrapper .works-list-section + .works-list-section {
	border-top: 1px solid #e2e8f0;
	padding-top: 2.5rem;
	margin-top: 2.5rem;
}

.editor-styles-wrapper .works-list-table-wrap figure.wp-block-table {
	overflow-x: auto;
	border: 1px solid #e2e8f0;
}

.editor-styles-wrapper .works-list-table thead th {
	background-color: #155c89;
	color: #fff;
	font-weight: 700;
	text-align: center;
	border-top: 1px solid #155c89;
	border-bottom: 1px solid #155c89;
	border-left: 1px solid rgba(255, 255, 255, 0.45);
	border-right: 1px solid rgba(255, 255, 255, 0.45);
}

.editor-styles-wrapper .works-list-table thead th:first-child {
	border-left-color: #155c89;
}

.editor-styles-wrapper .works-list-table thead th:last-child {
	border-right-color: #155c89;
}

.editor-styles-wrapper .works-list-table tbody td {
	border: 1px solid #e2e8f0;
	vertical-align: top;
}

.editor-styles-wrapper .works-list-table tbody tr:nth-child(even) td {
	background-color: #f8fafc;
}
