@charset "utf-8";
/*
 * 概算見積書（page-cost-preview.php）2026-10-18
 * A4縦1枚の紙を画面にそのまま出し、印刷（PDFに保存）でも同じ見た目になるようにしている。
 * 紙の幅は画面でも印刷でも 210mm。SPは JS で紙ごと縮めて見せる（--ep-scale。@media screen だけで効く）
 * 色は style.css の :root（--ink / --accent2 / --accent-bg / --border / --font-sub）を使う
 *
 * 1. ページ（背景・操作の帯）
 * 2. 紙
 * 3. 見出し・宛名・発行元
 * 4. 明細
 * 5. 合計・備考
 * 6. 印刷
 * 7. SP
 */

/* 1. ページ（背景・操作の帯）
----------------------------------------------------------- */
body.ep_page {
	background: var(--base);
}
.ep_bar {
	position: sticky;
	top: 0;
	z-index: 5;
	padding: 14px 20px 12px;
	border-bottom: 1px solid var(--border);
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(10px);
}
.ep_bar_in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 794px;
	margin: 0 auto;
}
.ep_bar_to {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.ep_bar_label {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--ink);
}
.ep_bar_input {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
	color: var(--font-base);
}
.ep_bar_input:focus,
.ep_bar_select:focus {
	border-color: var(--accent2);
	outline: none;
}
.ep_bar_select {
	flex-shrink: 0;
	width: auto;
	height: 42px;
	padding: 0 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: var(--font-base);
}
.ep_btn {
	flex-shrink: 0;
	height: 44px;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--navy-700), var(--ink));
	box-shadow: 0 10px 24px rgba(11, 33, 61, .18);
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: 1px;
	color: #fff;
	transition: transform .2s, box-shadow .2s;
	cursor: pointer;
}
.ep_btn:hover {
	box-shadow: 0 14px 30px rgba(11, 33, 61, .26);
	transform: translateY(-1px);
}
.ep_bar_note {
	max-width: 794px;
	margin: 8px auto 0;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.7;
	color: var(--font-sub);
}
.ep_stage {
	padding: 32px 16px 64px;
}

/* 2. 紙
----------------------------------------------------------- */
.ep_paper {
	margin: 0 auto;
}
.ep_sheet {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	overflow: hidden;
	width: 210mm;
	height: 296mm; /* 297mm ちょうどだと、印刷で白紙の2枚目が出ることがある */
	padding: 15mm 15mm 11mm;
	background: #fff;
	color: var(--font-base);
	letter-spacing: .3px;
	word-break: normal;
	print-color-adjust: exact;
}
.ep_body {
	display: flex;
	flex: 1;
	flex-direction: column;
}
.ep_sheet .gf {
	font-variant-numeric: tabular-nums;
}

/* 3. 見出し・宛名・発行元
----------------------------------------------------------- */
.ep_head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--ink);
}
.ep_tl {
	display: flex;
	align-items: baseline;
	gap: 14px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 8px;
	color: var(--ink);
}
.ep_tl_en {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 3px;
	color: var(--accent2);
}
.ep_meta {
	display: grid;
	grid-template-columns: auto auto;
	gap: 3px 14px;
	font-size: 11.5px;
	line-height: 1.5;
}
.ep_meta div {
	display: contents;
}
.ep_meta dt {
	color: var(--font-sub);
}
.ep_meta dd {
	text-align: right;
	color: var(--ink);
}
.ep_top {
	display: flex;
	justify-content: space-between;
	gap: 32px;
	margin-top: 26px;
}
.ep_to {
	flex: 1;
	min-width: 0;
}
.ep_to_name {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	min-height: 34px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--ink);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--ink);
}
.ep_to_sf {
	flex-shrink: 0;
	font-size: 15px;
}
.ep_subject {
	display: flex;
	gap: 16px;
	margin-top: 16px;
	font-size: 12.5px;
	line-height: 1.6;
}
.ep_subject dt {
	flex-shrink: 0;
	color: var(--font-sub);
}
.ep_subject dd {
	font-weight: 600;
	color: var(--ink);
}
.ep_lead {
	margin-top: 6px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.6;
}
.ep_amount {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	padding: 14px 18px;
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	background: var(--accent-bg);
	color: var(--ink);
}
.ep_amount_label {
	font-size: 13.5px;
	font-weight: 700;
}
.ep_amount_label small {
	font-size: 11px;
	font-weight: 400;
}
.ep_amount_v {
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}
.ep_amount_v .gf {
	margin-right: 3px;
	font-size: 30px;
	font-weight: 600;
	letter-spacing: 0;
}
.ep_from {
	flex-shrink: 0;
	width: 230px;
	padding-top: 2px;
}
.ep_from_logo {
	display: block;
	width: auto;
	height: auto;
	margin-bottom: 12px;
}
.ep_from_name {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--ink);
}
.ep_from_txt {
	margin-top: 4px;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.7;
	color: var(--font-sub);
}

/* 4. 明細
----------------------------------------------------------- */
.ep_table {
	width: 100%;
	margin-top: 28px;
	border-bottom: 1px solid var(--ink);
	font-size: 11.5px;
	line-height: 1.55;
}
.ep_table th {
	padding: 7px 10px;
	background: var(--ink);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	color: #fff;
}
.ep_table td {
	padding: 7px 10px;
	border-top: 1px solid var(--border);
	vertical-align: top;
}
/* 明細が13行以上のときは行を詰める（page-cost-preview.php） */
.is_dense .ep_table td {
	padding: 4px 10px;
	font-size: 10.5px;
	line-height: 1.45;
}
.is_dense td.ep_c_price .gf {
	font-size: 11.5px;
}
.ep_table tbody tr:nth-child(even) td {
	background: #FAFBFD;
}
.ep_table .ep_c_no {
	width: 30px;
	text-align: center;
}
td.ep_c_no {
	font-size: 10.5px;
	color: var(--accent2);
}
td.ep_c_item {
	width: 150px;
	font-weight: 600;
	color: var(--ink);
}
td.ep_c_name {
	color: var(--font-base);
}
.ep_table .ep_c_price {
	width: 104px;
	text-align: right;
	white-space: nowrap;
}
td.ep_c_price .gf {
	margin-right: 2px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink);
}
td.ep_c_empty {
	padding: 28px 10px;
	text-align: center;
	color: var(--font-sub);
}
td.ep_c_empty a {
	text-decoration: underline;
	color: var(--accent2);
}

/* 5. 合計・備考
----------------------------------------------------------- */
.ep_end {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 28px;
	margin-top: 16px;
}
.ep_sum {
	flex-shrink: 0;
	width: 270px;
	font-size: 12px;
}
.ep_sum div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 6px 4px;
	border-bottom: 1px solid var(--border);
	color: var(--font-sub);
}
.ep_sum dd .gf {
	margin-right: 2px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink);
}
.ep_sum .is_total {
	margin-top: 2px;
	padding: 9px 4px;
	border-bottom: 2px solid var(--ink);
	font-size: 13px;
	font-weight: 700;
	color: var(--ink);
}
.ep_sum .is_total dd .gf {
	font-size: 18px;
}
.ep_note {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--border);
}
.ep_note_tl {
	margin-bottom: 4px;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--ink);
}
.ep_note_list li {
	position: relative;
	padding-left: 11px;
	font-size: 10.5px;
	line-height: 1.7;
	color: var(--font-base);
}
.ep_note_list li:before {
	content: "";
	position: absolute;
	top: .8em;
	left: 0;
	width: 4px;
	height: 1px;
	background: var(--font-sub);
}
.ep_note_list li + li {
	margin-top: 3px;
}
.ep_foot {
	margin-top: auto;
	padding-top: 14px;
}
.ep_foot p {
	padding-top: 10px;
	border-top: 1px solid var(--border);
	font-size: 9.5px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--font-sub);
}

/* 6. 印刷
----------------------------------------------------------- */
/* 余白は紙（.ep_sheet）の padding で取るので、ページの余白は0。ブラウザが足すURLや日付のヘッダーも出なくなる */
@page {
	size: A4 portrait;
	margin: 0;
}
@media screen {
	.ep_paper {
		overflow: hidden;
		width: var(--ep-w, 210mm);
		height: var(--ep-h, auto);
		box-shadow: 0 20px 60px rgba(11, 33, 61, .12);
	}
	.ep_sheet {
		transform: scale(var(--ep-scale, 1));
		transform-origin: 0 0;
	}
}
@media print {
	html,
	body.ep_page {
		background: #fff;
	}
	.ep_bar,
	#wpadminbar {
		display: none;
	}
	.ep_stage {
		padding: 0;
	}
}

/* 7. SP
----------------------------------------------------------- */
@media screen and ( max-width:760px ) {
	.ep_bar {
		padding: 10px 16px;
	}
	.ep_bar_in {
		flex-wrap: wrap;
		gap: 10px;
	}
	.ep_bar_to {
		flex-basis: 100%;
	}
	.ep_btn {
		width: 100%;
	}
	.ep_bar_note {
		font-size: 11px;
	}
	.ep_stage {
		padding: 16px 16px 40px;
	}
	.ep_paper {
		box-shadow: 0 10px 30px rgba(11, 33, 61, .12);
	}
}
