/* ============================================================
   HFS Agreement Document Styles
   Shared between hfs-admin and hfs-store.
   Used for on-screen rendering in the Agreements tab and
   store My Account page, and for print output.
   ============================================================ */

/* ── On-screen document viewport ── */
.agr-doc-viewport {
	overflow-y: auto;
	flex: 1;
	min-height: 0;
	padding: 20px 24px;
	background: transparent;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ── Shared document preview zoom controls ── */
.hfs-doc-zoom-bar,
.agr-zoom-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}
.hfs-doc-zoom-btn,
.agr-zoom-btn {
	width: 28px;
	height: 28px;
	border: 1px solid var(--hfs-border, #ccc);
	border-radius: 6px;
	background-color: transparent;
	color: var(--hfs-text-muted, #666);
	font-size: 0.95rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.hfs-doc-zoom-btn:hover,
.agr-zoom-btn:hover {
	background-color: var(--hfs-brown-dark, #4A3728);
	border-color: var(--hfs-brown-dark, #4A3728);
	color: #fff;
}
.hfs-doc-zoom-btn:focus,
.hfs-doc-zoom-btn:focus-visible,
.agr-zoom-btn:focus,
.agr-zoom-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--hfs-gold-fill-strong, rgba(201,169,78,0.45));
}
.hfs-doc-zoom-label,
.agr-zoom-label {
	font-size: 0.75rem;
	color: var(--hfs-text-muted, #666);
	min-width: 36px;
	text-align: center;
}

/* ── Scale wrapper ── */
.agr-doc-scale-wrap {
	transform-origin: top center;
	/* transform: scale(N) set by JS */
}

/* ── Page (letter-size document card) ── */
.agr-page {
	width: 8.5in;
	min-height: 10.9in;
	padding: 0.7in 0.7in 1.05in 0.7in;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0,0,0,0.14);
	position: relative;
	font-family: "Times New Roman", Georgia, serif;
	font-size: 12pt;
	line-height: 1.35;
	color: #111;
	box-sizing: border-box;
}

/* ── Document header ── */
.agr-doc-header {
	text-align: center;
	margin-bottom: 18px;
	border-bottom: 1.5px solid #222;
	padding-bottom: 10px;
}
.agr-doc-title {
	font-size: 18pt;
	font-weight: bold;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	margin: 0 0 6px 0;
}
.agr-doc-subtitle {
	font-size: 10.5pt;
	color: #444;
	margin: 0;
}

/* ── Meta row (account number, dates) ── */
.agr-meta-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px 14px;
	margin: 12px 0 16px 0;
}

/* ── Info grids ── */
.agr-info-grid  { display: grid; grid-template-columns: 1fr 1fr;     gap: 10px 14px; margin-bottom: 14px; }
.agr-two-col    { display: grid; grid-template-columns: 1fr 1fr;     gap: 10px 14px; }
.agr-three-col  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 14px; }

/* ── Individual fields ── */
.agr-field { position: relative; }

.agr-label {
	display: block;
	font-size: 9pt;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.45px;
	margin-bottom: 2px;
	font-family: Arial, Helvetica, sans-serif;
	color: #444;
}

.agr-value-line {
	min-height: 22px;
	border-bottom: 1px solid #222;
	padding: 2px 4px 1px 4px;
	font-size: 11pt;
}

/* Filled value styling — set by merge function */
.agr-value-line.agr-filled {
	font-style: italic;
	color: #111;
}

/* ── Section titles ── */
.agr-section-title {
	font-size: 12pt;
	margin: 18px 0 8px 0;
	padding-bottom: 3px;
	border-bottom: 1px solid #777;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

/* ── Body text ── */
.agr-page p {
	margin: 8px 0;
	text-align: justify;
}
.agr-page ol,
.agr-page ul {
	margin: 8px 0 10px 20px;
	padding: 0;
}
.agr-page li { margin: 4px 0; }

/* ── Tables ── */
.agr-page table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 12px 0;
}
.agr-page th,
.agr-page td {
	border: 1px solid #222;
	padding: 6px 8px;
	vertical-align: top;
	font-size: 11pt;
}
.agr-page th {
	text-align: left;
	font-weight: bold;
}

/* ── Signature grid ── */
.agr-signature-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px 20px;
	margin-top: 18px;
}
.agr-signature-block { padding-top: 24px; }
.agr-signature-line {
	border-bottom: 1px solid #222;
	height: 24px;
	margin-bottom: 4px;
}
.agr-signature-caption {
	font-size: 9pt;
	color: #444;
	font-family: Arial, Helvetica, sans-serif;
}

/* ── Note box ── */
.agr-note-box {
	border: 1px solid #222;
	padding: 10px 12px;
	margin: 10px 0 14px 0;
	font-size: 9.5pt;
	line-height: 1.28;
}

/* ── Checkbox lines ── */
.agr-checkbox-line { margin: 5px 0; font-size: 11pt; }
.agr-checkbox {
	display: inline-block;
	width: 13px;
	height: 13px;
	border: 1px solid #222;
	margin-right: 6px;
	vertical-align: -1px;
}

/* ── Footer mark ── */
.agr-footer-mark {
	position: absolute;
	bottom: 0.45in;
	left: 0.7in;
	right: 0.7in;
	font-size: 9pt;
	color: #444;
	display: flex;
	justify-content: space-between;
	border-top: 1px solid #bbb;
	padding-top: 4px;
	font-family: Arial, Helvetica, sans-serif;
}

/* ── Print ── */
@media print {
	.agr-doc-viewport { padding: 0; overflow: visible; }
	.agr-zoom-bar     { display: none; }
	.agr-doc-scale-wrap { transform: none !important; }
	.agr-page {
		width: auto;
		min-height: auto;
		box-shadow: none;
		padding: 0;
	}
}

@page {
	size: Letter;
	margin: 0.65in;
}
