/**
 * Public resume document — professional standalone view.
 */

/* -------------------------------------------------------------------------
   Document shell
   ------------------------------------------------------------------------- */

html,
body.rezicraft-public-resume-page {
	margin: 0;
	padding: 0;
	background: #e8ecf1;
	color: #111827;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.rezicraft-public-resume-page .rezicraft-public-shell {
	box-sizing: border-box;
	min-height: 100vh;
	padding: 40px 20px 56px;
}

body.rezicraft-public-resume-page .rezicraft-public-document {
	box-sizing: border-box;
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
}

body.rezicraft-public-resume-page .rezicraft-public-document .rezicraft-resume {
	box-sizing: border-box;
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: 52px 60px;
	background: var(--rezicraft-sidebar, #ffffff);
	border: 1px solid var(--rezicraft-border, #dde3ea);
	border-radius: 2px;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 40px rgba(15, 23, 42, 0.08);
	color: var(--rezicraft-text, #111827);
	font-family: var(--rezicraft-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	font-size: 12px;
	line-height: 1.55;
}

/* Block editor canvas — paper preview; template CSS sets font-size/color on the iframe body */
.editor-styles-wrapper.rezicraft-resume {
	box-sizing: border-box;
	max-width: none;
	margin: 0;
	padding: 52px 60px;
	background: var(--rezicraft-sidebar, #ffffff);
	border: 1px solid var(--rezicraft-border, #dde3ea);
	border-radius: 2px;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 40px rgba(15, 23, 42, 0.08);
	color: var(--rezicraft-text, #111827);
	font-family: var(--rezicraft-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	line-height: 1.55;
}

/* Serif templates */
body.rezicraft-public-resume-page--nairobi .rezicraft-resume,
body.rezicraft-public-resume-page--istanbul .rezicraft-resume,
body.rezicraft-public-resume-page--bangkok .rezicraft-resume,
body.rezicraft-public-resume-page--beijing .rezicraft-resume,
.editor-styles-wrapper.rezicraft-resume--nairobi,
.editor-styles-wrapper.rezicraft-resume--istanbul,
.editor-styles-wrapper.rezicraft-resume--bangkok,
.editor-styles-wrapper.rezicraft-resume--beijing {
	font-family: "Times New Roman", Times, Georgia, serif;
}

/* -------------------------------------------------------------------------
   Block typography (Gutenberg output — public + editor)
   ------------------------------------------------------------------------- */

body.rezicraft-public-resume-page .rezicraft-resume > h1.wp-block-heading:first-of-type:not(.has-text-color) {
	margin: 0 0 10px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rezicraft-accent, var(--rezicraft-text, #111827));
}

body.rezicraft-public-resume-page .rezicraft-resume > h1.wp-block-heading.has-text-align-center,
.editor-styles-wrapper.rezicraft-resume .is-root-container > h1.wp-block-heading.has-text-align-center,
.editor-styles-wrapper.rezicraft-resume .block-editor-block-list__layout > h1.wp-block-heading.has-text-align-center,
.editor-styles-wrapper.rezicraft-resume > h1.wp-block-heading.has-text-align-center {
	text-align: center;
}

body.rezicraft-public-resume-page .rezicraft-resume > p.has-text-align-center:not(.has-text-color) {
	margin: 0 0 4px;
	font-size: 11px;
	line-height: 1.5;
	text-align: center;
	color: var(--rezicraft-muted, #374151);
}

body.rezicraft-public-resume-page .rezicraft-resume > h2.wp-block-heading:not(.has-text-color) {
	margin: 22px 0 0;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--rezicraft-rule, #111827);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--rezicraft-accent, var(--rezicraft-text, #111827));
}

body.rezicraft-public-resume-page .rezicraft-resume > .wp-block-separator,
body.rezicraft-public-resume-page .rezicraft-resume hr.wp-block-separator,
.editor-styles-wrapper.rezicraft-resume .is-root-container > .wp-block-separator,
.editor-styles-wrapper.rezicraft-resume .block-editor-block-list__layout > .wp-block-separator,
.editor-styles-wrapper.rezicraft-resume .is-root-container > hr.wp-block-separator,
.editor-styles-wrapper.rezicraft-resume .block-editor-block-list__layout > hr.wp-block-separator,
.editor-styles-wrapper.rezicraft-resume > .wp-block-separator,
.editor-styles-wrapper.rezicraft-resume hr.wp-block-separator {
	display: none;
	margin: 0;
	border: 0;
}

body.rezicraft-public-resume-page .rezicraft-resume p:not(.has-text-color) {
	margin: 0 0 4px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--rezicraft-muted, #374151);
}

body.rezicraft-public-resume-page .rezicraft-resume p strong,
.editor-styles-wrapper.rezicraft-resume p strong {
	color: var(--rezicraft-text, #111827);
	font-weight: 700;
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-list,
body.rezicraft-public-resume-page .rezicraft-resume ul,
.editor-styles-wrapper.rezicraft-resume .wp-block-list,
.editor-styles-wrapper.rezicraft-resume ul {
	margin: 6px 0 10px;
	padding-left: 18px;
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-list li:not(.has-text-color),
body.rezicraft-public-resume-page .rezicraft-resume ul li:not(.has-text-color) {
	margin-bottom: 3px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--rezicraft-muted, #374151);
}

/* Two-column rows (title/date, company/location) */
body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns,
.editor-styles-wrapper.rezicraft-resume .wp-block-columns {
	display: flex;
	gap: 16px;
	margin: 0 0 2px;
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns .wp-block-column,
.editor-styles-wrapper.rezicraft-resume .wp-block-columns .wp-block-column {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns .wp-block-column p,
.editor-styles-wrapper.rezicraft-resume .wp-block-columns .wp-block-column p {
	margin: 0;
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns .wp-block-column p.has-text-align-right,
.editor-styles-wrapper.rezicraft-resume .wp-block-columns .wp-block-column p.has-text-align-right {
	text-align: right;
	white-space: nowrap;
	font-weight: 700;
	color: var(--rezicraft-text, #111827);
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns + .wp-block-list,
body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns + ul,
.editor-styles-wrapper.rezicraft-resume .wp-block-columns + .wp-block-list,
.editor-styles-wrapper.rezicraft-resume .wp-block-columns + ul {
	margin-top: 4px;
}

/* Nested blocks inside columns (Tokyo sidebar layout) */
body.rezicraft-public-resume-page .rezicraft-resume .wp-block-column > h2.wp-block-heading,
.editor-styles-wrapper.rezicraft-resume .wp-block-column > h2.wp-block-heading {
	margin-top: 16px;
}

body.rezicraft-public-resume-page .rezicraft-resume .wp-block-column > h2.wp-block-heading:first-child,
.editor-styles-wrapper.rezicraft-resume .wp-block-column > h2.wp-block-heading:first-child {
	margin-top: 0;
}

/* Links */
body.rezicraft-public-resume-page .rezicraft-resume a,
.editor-styles-wrapper.rezicraft-resume a {
	color: var(--rezicraft-link, #2563eb);
	text-decoration: none;
}

body.rezicraft-public-resume-page .rezicraft-resume a:hover,
.editor-styles-wrapper.rezicraft-resume a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Theme chrome fallback (non-plugin templates)
   ------------------------------------------------------------------------- */

body.single-rezicraft_resume:not(.rezicraft-public-resume-page) .site-header,
body.single-rezicraft_resume:not(.rezicraft-public-resume-page) .site-footer,
body.single-rezicraft_resume:not(.rezicraft-public-resume-page) #masthead,
body.single-rezicraft_resume:not(.rezicraft-public-resume-page) #colophon,
body.single-rezicraft_resume .entry-title,
body.single-rezicraft_resume .post-title,
body.single-rezicraft_resume .page-title,
body.single-rezicraft_resume .wp-block-post-title,
body.single-rezicraft_resume .entry-header,
body.single-rezicraft_resume .entry-meta,
body.single-rezicraft_resume .post-meta,
body.single-rezicraft_resume .byline,
body.single-rezicraft_resume .posted-on,
body.single-rezicraft_resume .author,
body.single-rezicraft_resume .author-name,
body.single-rezicraft_resume .wp-block-post-author,
body.single-rezicraft_resume .wp-block-post-author-name,
body.single-rezicraft_resume .wp-block-post-date,
body.single-rezicraft_resume .post-navigation,
body.single-rezicraft_resume .navigation.post-navigation,
body.single-rezicraft_resume .nav-links,
body.single-rezicraft_resume .wp-block-post-navigation-link,
body.single-rezicraft_resume .related-posts,
body.single-rezicraft_resume .more-posts,
body.single-rezicraft_resume .jp-relatedposts,
body.single-rezicraft_resume .yarpp-related,
body.single-rezicraft_resume .entry-footer,
body.single-rezicraft_resume .post-footer,
body.single-rezicraft_resume .comments-area,
body.single-rezicraft_resume #comments {
	display: none !important;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 782px) {
	body.rezicraft-public-resume-page .rezicraft-public-shell {
		padding: 16px 12px 32px;
	}

	body.rezicraft-public-resume-page .rezicraft-public-document .rezicraft-resume,
	.editor-styles-wrapper.rezicraft-resume {
		padding: 32px 24px;
	}

	body.rezicraft-public-resume-page .rezicraft-resume,
	.editor-styles-wrapper.rezicraft-resume {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	/* Stack side-by-side PHP preview rows (admin preview + legacy template HTML). */
	body.rezicraft-public-resume-page .rezicraft-resume [class*="__headline"],
	body.rezicraft-public-resume-page .rezicraft-resume [class*="__meta"],
	body.rezicraft-public-resume-page .rezicraft-resume [class*="__subheadline"],
	body.rezicraft-public-resume-page .rezicraft-resume [class*="__company-row"],
	body.rezicraft-public-resume-page .rezicraft-resume [class*="__project-row"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__headline"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__meta"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__subheadline"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__company-row"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__project-row"] {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}

	body.rezicraft-public-resume-page .rezicraft-resume .rezicraft-contact-bar,
	body.rezicraft-public-resume-page .rezicraft-resume .rezicraft-resume__header,
	.rezicraft-template-preview-canvas .rezicraft-resume .rezicraft-contact-bar,
	.rezicraft-template-preview-canvas .rezicraft-resume .rezicraft-resume__header {
		flex-direction: column;
		align-items: flex-start;
	}

	body.rezicraft-public-resume-page .rezicraft-resume [class*="__dates"],
	body.rezicraft-public-resume-page .rezicraft-resume [class*="__location"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__dates"],
	.rezicraft-template-preview-canvas .rezicraft-resume [class*="__location"] {
		flex: 1 1 auto;
		max-width: 100%;
		text-align: left;
		white-space: normal;
	}

	body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns,
	.editor-styles-wrapper.rezicraft-resume .wp-block-columns {
		flex-direction: column;
		gap: 2px;
	}

	body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns .wp-block-column,
	.editor-styles-wrapper.rezicraft-resume .wp-block-columns .wp-block-column {
		flex-basis: 100% !important;
		width: 100%;
	}

	body.rezicraft-public-resume-page .rezicraft-resume .wp-block-columns .wp-block-column p.has-text-align-right,
	.editor-styles-wrapper.rezicraft-resume .wp-block-columns .wp-block-column p.has-text-align-right {
		text-align: left;
		white-space: normal;
		font-weight: 400;
	}
}

@media (max-width: 480px) {
	body.rezicraft-public-resume-page .rezicraft-public-shell {
		padding: 12px 8px 28px;
	}

	body.rezicraft-public-resume-page .rezicraft-public-document .rezicraft-resume,
	.editor-styles-wrapper.rezicraft-resume {
		padding: 24px 16px;
	}

	body.rezicraft-public-resume-page .rezicraft-resume > h1.wp-block-heading:first-of-type:not(.has-text-color) {
		font-size: clamp(22px, 7vw, 30px);
	}
}

/* -------------------------------------------------------------------------
   Print
   ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
   Public actions (Print + PDF — screen only; hidden in print.css @media print)
   ------------------------------------------------------------------------- */

.rezicraft-public-actions {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.rezicraft-resume-action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: 1px solid #dde3ea;
	border-radius: 4px;
	background: #ffffff;
	color: #111827;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.rezicraft-resume-action:hover,
.rezicraft-resume-action:focus {
	border-color: #94a3b8;
	background: #f8fafc;
	color: #111827;
	text-decoration: none;
}

.rezicraft-resume-action:focus {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* PDF download endpoint — hide actions; browser print dialog opens automatically */
body.rezicraft-pdf-download .rezicraft-public-actions {
	display: none;
}

@media (max-width: 782px) {
	.rezicraft-public-actions {
		right: 12px;
		bottom: 12px;
		gap: 6px;
	}

	.rezicraft-resume-action {
		padding: 8px 12px;
		font-size: 12px;
	}
}

@media print {
	html,
	body.rezicraft-public-resume-page {
		background: #ffffff !important;
	}

	body.rezicraft-public-resume-page .rezicraft-public-shell {
		min-height: auto;
		padding: 0 !important;
	}

	body.rezicraft-public-resume-page .rezicraft-public-document {
		max-width: none;
		margin: 0;
	}

	body.rezicraft-public-resume-page .rezicraft-public-document .rezicraft-resume {
		max-width: none;
		margin: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: var(--rezicraft-sidebar, #ffffff);
		color: var(--rezicraft-text, #111827);
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}
