/* Tailwind utilities (no base/preflight to avoid WP style conflicts). */
.container {
	width: 100%;
}
@media (min-width: 640px) {
	.container {
		max-width: 640px;
	}
}
@media (min-width: 768px) {
	.container {
		max-width: 768px;
	}
}
@media (min-width: 1024px) {
	.container {
		max-width: 1024px;
	}
}
@media (min-width: 1280px) {
	.container {
		max-width: 1280px;
	}
}
@media (min-width: 1536px) {
	.container {
		max-width: 1536px;
	}
}
.equalify-reflow-viewer .visible {
	visibility: visible;
}
.equalify-reflow-viewer .fixed {
	position: fixed;
}
.equalify-reflow-viewer .absolute {
	position: absolute;
}
.equalify-reflow-viewer .block {
	display: block;
}
.equalify-reflow-viewer .table {
	display: table;
}
.equalify-reflow-viewer .hidden {
	display: none;
}

/*
 * Equalify Reflow Viewer — Full-Page SPA Styles.
 *
 * These styles are scoped to .equalify-reflow-viewer to prevent
 * leaking into the surrounding WordPress theme.
 */

/* ===== Reset body for full-page viewer ===== */
.equalify-reflow-viewer-body {
	margin: 0;
	padding: 0;
}

/* ===== Container ===== */
.equalify-reflow-viewer {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #1d2327;
	background: #f0f0f1;
	min-height: 100vh;
}

/* ===== App layout: browser sidebar + main area ===== */
.equalify-reflow-viewer .equalify-reflow-app-layout {
	display: flex;
	min-height: 100vh;
}

/* ===== Main area ===== */
.equalify-reflow-viewer .equalify-reflow-main-area {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* ===== Welcome / empty state ===== */
.equalify-reflow-viewer .equalify-reflow-welcome {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.equalify-reflow-viewer .equalify-reflow-welcome-content {
	text-align: center;
	color: #50575e;
}

.equalify-reflow-viewer .equalify-reflow-welcome-content h1 {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 8px;
	color: #1d2327;
}

.equalify-reflow-viewer .equalify-reflow-welcome-content p {
	font-size: 16px;
	margin: 0;
}

/* ===== Header ===== */
.equalify-reflow-viewer .equalify-reflow-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #1d2327;
	color: #fff;
	padding: 12px 24px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.equalify-reflow-viewer .equalify-reflow-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1400px;
	margin: 0 auto;
	flex-wrap: wrap;
}

.equalify-reflow-viewer .equalify-reflow-doc-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	flex: 1;
	min-width: 200px;
	color: #fff;
}

.equalify-reflow-viewer .equalify-reflow-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* ===== Search ===== */
.equalify-reflow-viewer .equalify-reflow-search-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.equalify-reflow-viewer .equalify-reflow-search-input {
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 14px;
	width: 220px;
	transition: border-color 0.2s, background 0.2s;
}

.equalify-reflow-viewer .equalify-reflow-search-input::-moz-placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.equalify-reflow-viewer .equalify-reflow-search-input::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.equalify-reflow-viewer .equalify-reflow-search-input:focus {
	outline: 2px solid #72aee6;
	outline-offset: -2px;
	background: rgba(255, 255, 255, 0.15);
	border-color: transparent;
}

.equalify-reflow-viewer .equalify-reflow-search-count {
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	white-space: nowrap;
}

/* ===== Downloads ===== */
.equalify-reflow-viewer .equalify-reflow-downloads {
	display: flex;
	align-items: center;
	gap: 12px;
}

.equalify-reflow-viewer .equalify-reflow-download-link {
	color: #72aee6;
	text-decoration: none;
	font-size: 14px;
	white-space: nowrap;
}

.equalify-reflow-viewer .equalify-reflow-download-link:hover,
.equalify-reflow-viewer .equalify-reflow-download-link:focus {
	color: #fff;
	text-decoration: underline;
}

.equalify-reflow-viewer .equalify-reflow-download-link:focus {
	outline: 2px solid #72aee6;
	outline-offset: 2px;
}

/* ===== Document layout: TOC + content ===== */
.equalify-reflow-viewer .equalify-reflow-layout {
	display: flex;
	max-width: 1400px;
	margin: 0 auto;
	min-height: calc(100vh - 60px);
}

/* ===== Sidebar / TOC ===== */
.equalify-reflow-viewer .equalify-reflow-sidebar {
	position: sticky;
	top: 60px;
	width: 280px;
	max-height: calc(100vh - 60px);
	overflow-y: auto;
	flex-shrink: 0;
	padding: 24px 16px;
	background: #fff;
	border-right: 1px solid #dcdcde;
}

.equalify-reflow-viewer .equalify-reflow-toc-heading {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #50575e;
	margin: 0 0 12px;
}

.equalify-reflow-viewer .equalify-reflow-toc {
	list-style: none;
	margin: 0;
	padding: 0;
}

.equalify-reflow-viewer .equalify-reflow-toc-item {
	margin: 0;
}

.equalify-reflow-viewer .equalify-reflow-toc-item a {
	display: block;
	padding: 4px 8px;
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
	border-radius: 3px;
	transition: background 0.15s, color 0.15s;
}

.equalify-reflow-viewer .equalify-reflow-toc-item a:hover,
.equalify-reflow-viewer .equalify-reflow-toc-item a:focus {
	background: #f0f6fc;
	color: #135e96;
}

.equalify-reflow-viewer .equalify-reflow-toc-item a:focus {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

/* Active TOC item */
.equalify-reflow-viewer .equalify-reflow-toc-active a {
	background: #f0f6fc;
	color: #135e96;
	font-weight: 600;
}

/* Indent TOC levels */
.equalify-reflow-viewer .equalify-reflow-toc-level-2 a { padding-left: 20px; }
.equalify-reflow-viewer .equalify-reflow-toc-level-3 a { padding-left: 32px; font-size: 12px; }
.equalify-reflow-viewer .equalify-reflow-toc-level-4 a { padding-left: 44px; font-size: 12px; color: #646970; }
.equalify-reflow-viewer .equalify-reflow-toc-level-5 a { padding-left: 56px; font-size: 12px; color: #646970; }
.equalify-reflow-viewer .equalify-reflow-toc-level-6 a { padding-left: 68px; font-size: 12px; color: #646970; }

/* ===== Main content area ===== */
.equalify-reflow-viewer .equalify-reflow-main {
	flex: 1;
	min-width: 0;
}

.equalify-reflow-viewer .equalify-reflow-content {
	padding: 32px 48px;
	background: #fff;
}

.equalify-reflow-viewer .equalify-reflow-content h1,
.equalify-reflow-viewer .equalify-reflow-content h2,
.equalify-reflow-viewer .equalify-reflow-content h3,
.equalify-reflow-viewer .equalify-reflow-content h4,
.equalify-reflow-viewer .equalify-reflow-content h5,
.equalify-reflow-viewer .equalify-reflow-content h6 {
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	line-height: 1.3;
	scroll-margin-top: 80px;
}

.equalify-reflow-viewer .equalify-reflow-content h1 { font-size: 2em; }
.equalify-reflow-viewer .equalify-reflow-content h2 { font-size: 1.6em; border-bottom: 1px solid #dcdcde; padding-bottom: 0.3em; }
.equalify-reflow-viewer .equalify-reflow-content h3 { font-size: 1.3em; }
.equalify-reflow-viewer .equalify-reflow-content h4 { font-size: 1.1em; }

/* Heading anchor links — visible on hover/focus, symbol via CSS ::after */
.equalify-reflow-viewer .equalify-reflow-content .equalify-reflow-heading-anchor {
	margin-left: 0.4em;
	text-decoration: none;
	opacity: 0;
	transition: opacity 0.15s;
}

.equalify-reflow-viewer .equalify-reflow-content .equalify-reflow-heading-anchor::after {
	content: "#";
	color: #2271b1;
	font-weight: 400;
	font-size: 0.8em;
}

.equalify-reflow-viewer .equalify-reflow-content h1:hover .equalify-reflow-heading-anchor,
.equalify-reflow-viewer .equalify-reflow-content h2:hover .equalify-reflow-heading-anchor,
.equalify-reflow-viewer .equalify-reflow-content h3:hover .equalify-reflow-heading-anchor,
.equalify-reflow-viewer .equalify-reflow-content h4:hover .equalify-reflow-heading-anchor,
.equalify-reflow-viewer .equalify-reflow-content h5:hover .equalify-reflow-heading-anchor,
.equalify-reflow-viewer .equalify-reflow-content h6:hover .equalify-reflow-heading-anchor,
.equalify-reflow-viewer .equalify-reflow-content .equalify-reflow-heading-anchor:focus {
	opacity: 1;
}

.equalify-reflow-viewer .equalify-reflow-content .equalify-reflow-heading-anchor:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.equalify-reflow-viewer .equalify-reflow-content p {
	margin: 0 0 1em;
}

.equalify-reflow-viewer .equalify-reflow-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 1em 0;
}

/* Table wrapper for horizontal scrolling */
.equalify-reflow-viewer .equalify-reflow-table-wrapper {
	overflow-x: auto;
	margin: 1em 0;
}

.equalify-reflow-viewer .equalify-reflow-content table {
	border-collapse: collapse;
	width: 100%;
}

.equalify-reflow-viewer .equalify-reflow-content th,
.equalify-reflow-viewer .equalify-reflow-content td {
	border: 1px solid #dcdcde;
	padding: 8px 12px;
	text-align: left;
}

.equalify-reflow-viewer .equalify-reflow-content th {
	background: #f6f7f7;
	font-weight: 600;
}

.equalify-reflow-viewer .equalify-reflow-content blockquote {
	margin: 1em 0;
	padding: 12px 20px;
	border-left: 4px solid #2271b1;
	background: #f0f6fc;
	color: #1d2327;
}

.equalify-reflow-viewer .equalify-reflow-content pre {
	position: relative;
	background: #2c3338;
	color: #e0e0e0;
	padding: 16px;
	border-radius: 4px;
	overflow-x: auto;
	font-size: 14px;
}

/* Code block language label — positioned top-right */
.equalify-reflow-viewer .equalify-reflow-content .equalify-reflow-code-language {
	position: absolute;
	top: 6px;
	right: 10px;
	font-size: 11px;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	pointer-events: none;
}

.equalify-reflow-viewer .equalify-reflow-content code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
}

.equalify-reflow-viewer .equalify-reflow-content pre code {
	background: none;
	padding: 0;
}

.equalify-reflow-viewer .equalify-reflow-content ul,
.equalify-reflow-viewer .equalify-reflow-content ol {
	margin: 0 0 1em;
	padding-left: 2em;
}

.equalify-reflow-viewer .equalify-reflow-content li {
	margin-bottom: 0.25em;
}

/* ===== Search highlight ===== */
.equalify-reflow-viewer .equalify-reflow-highlight {
	background: #fff3cd;
	padding: 1px 2px;
	border-radius: 2px;
}

/* ===== Loading and error states ===== */
.equalify-reflow-viewer .equalify-reflow-loading,
.equalify-reflow-viewer .equalify-reflow-error {
	padding: 32px;
	text-align: center;
	background: #fff;
}

.equalify-reflow-viewer .equalify-reflow-error {
	color: #d63638;
}

/* ===== Screen reader text ===== */
.equalify-reflow-viewer .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ===== Feedback trigger button (in viewer header) ===== */
.equalify-reflow-viewer .equalify-reflow-feedback-trigger {
	background: transparent;
	color: #72aee6;
	border: 1px solid #72aee6;
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s, color 0.2s;
	font-family: inherit;
	line-height: 1.4;
}

.equalify-reflow-viewer .equalify-reflow-feedback-trigger:hover,
.equalify-reflow-viewer .equalify-reflow-feedback-trigger:focus {
	background: #72aee6;
	color: #1d2327;
}

.equalify-reflow-viewer .equalify-reflow-feedback-trigger:focus {
	outline: 2px solid #72aee6;
	outline-offset: 2px;
}

/* ===== Feedback modal (portal — rendered at body) ===== */
.equalify-reflow-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.equalify-reflow-modal-dialog {
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	color: #1d2327;
	line-height: 1.5;
}

.equalify-reflow-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #dcdcde;
}

.equalify-reflow-modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
}

.equalify-reflow-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #50575e;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.equalify-reflow-modal-close:hover,
.equalify-reflow-modal-close:focus {
	color: #1d2327;
}

.equalify-reflow-modal-close:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.equalify-reflow-modal-body {
	padding: 20px;
}

.equalify-reflow-modal-field {
	margin-bottom: 16px;
}

.equalify-reflow-modal-field fieldset {
	border: none;
	margin: 0;
	padding: 0;
}

.equalify-reflow-modal-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 6px;
}

.equalify-reflow-modal-optional {
	font-weight: 400;
	color: #646970;
	margin-left: 4px;
}

/* Form inputs */
.equalify-reflow-modal-select,
.equalify-reflow-modal-input,
.equalify-reflow-modal-textarea {
	display: block;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	color: #1d2327;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.equalify-reflow-modal-select:focus,
.equalify-reflow-modal-input:focus,
.equalify-reflow-modal-textarea:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Honeypot — visually hidden to catch bots */
.equalify-reflow-modal-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.equalify-reflow-modal-textarea {
	resize: vertical;
	min-height: 60px;
}

.equalify-reflow-modal-input-narrow {
	width: 100px;
}

/* Actions row */
.equalify-reflow-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding-top: 8px;
}

.equalify-reflow-modal-btn {
	padding: 8px 18px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	font-family: inherit;
	transition: background 0.15s;
}

.equalify-reflow-modal-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.equalify-reflow-modal-btn-cancel {
	background: #f0f0f1;
	color: #50575e;
	border-color: #8c8f94;
}

.equalify-reflow-modal-btn-cancel:hover:not(:disabled) {
	background: #dcdcde;
}

.equalify-reflow-modal-btn-submit {
	background: #2271b1;
	color: #fff;
}

.equalify-reflow-modal-btn-submit:hover:not(:disabled) {
	background: #135e96;
}

.equalify-reflow-modal-btn:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Success state */
.equalify-reflow-modal-success {
	padding: 40px 20px;
	text-align: center;
	color: #00a32a;
	font-size: 15px;
	font-weight: 500;
}

/* Error state */
.equalify-reflow-modal-error {
	background: #fcf0f1;
	border: 1px solid #d63638;
	color: #d63638;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 16px;
}

/* Screen reader text (shared with viewer) */
.equalify-reflow-modal-dialog .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
	.equalify-reflow-viewer .equalify-reflow-layout {
		flex-direction: column;
	}

	.equalify-reflow-viewer .equalify-reflow-sidebar {
		position: static;
		width: 100%;
		max-height: none;
		border-right: none;
		border-bottom: 1px solid #dcdcde;
	}

	.equalify-reflow-viewer .equalify-reflow-content {
		padding: 24px 16px;
	}

	.equalify-reflow-viewer .equalify-reflow-search-input {
		width: 160px;
	}

	/* Feedback modal — full width on mobile */
	.equalify-reflow-modal-overlay {
		padding: 12px;
	}

	.equalify-reflow-modal-dialog {
		max-width: none;
		max-height: 95vh;
	}

}

