/* ============================================================
   Legacy Help Modal (non-new-help containers)
   ============================================================ */

.focus-help {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.focus-help-iframe-container {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 50px;
	left: 0;
}

.focus-help-iframe {
	width: 100%;
	height: 100%;
	border: 0;
	border-bottom: 1px solid #AAA;
}

.focus-help-preferences {
	box-sizing: border-box;
	position: absolute;
	display: block;
	right: 0;
	bottom: 0;
	left: 0;
	height: 50px;
	padding: 10px;
	border-top: 1px solid #AAA;
	box-shadow: 0 -3px 3px rgba(0, 0, 0, .2);
}

.focus-help-new-window-container {
	margin-bottom: 10px;
}

.focus-help-new-window:before {
	content: url('../../assets/new_window.png');
	display: inline-block;
	vertical-align: middle;
	margin-right: 0.5em;
}


/* ============================================================
   New Help Modal — Tabbed Design
   ============================================================ */

.focus-help-new-help {
	position: relative;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	width: 100%;
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #fcfcfa;
	animation: focus-help-entrance 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* The modal system revives hidden content as display:block; new help needs flex layout. */
.focus-modal .focus-help-new-help.focus-modal-hidden {
	display: flex !important;
}

@keyframes focus-help-entrance {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Hide legacy elements in new help mode */
.focus-help-new-help .focus-help-iframe-container {
	display: none;
}

.focus-help-new-help .focus-help-preferences {
	display: none;
}

/* Header */
.focus-help-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	border-bottom: 1px solid #e8e7e4;
	background: #fcfcfa;
	flex-shrink: 0;
}

/* Tabs — pill segmented control */
.focus-help-tabs {
	display: flex;
	gap: 3px;
	background: #f7f6f3;
	border-radius: 6px;
	padding: 3px;
	border: 1px solid #e8e7e4;
}

.focus-help-tab {
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	font-family: system-ui, -apple-system, sans-serif;
	color: #64648b;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: color 150ms cubic-bezier(0.16, 1, 0.3, 1),
	            background 150ms cubic-bezier(0.16, 1, 0.3, 1),
	            box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1);
	white-space: nowrap;
	letter-spacing: -0.01em;
	line-height: 1.4;
}

.focus-help-tab:hover {
	color: #1a1a2e;
	background: rgba(255, 255, 255, 0.6);
}

.focus-help-tab.active {
	color: #1a1a2e;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(26, 26, 46, 0.06),
	            0 1px 2px rgba(26, 26, 46, 0.04);
}

/* District tab hidden until JS reveals it */
.focus-help-tab-district {
	display: none;
}

/* Actions area (right side of header) */
.focus-help-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Override the legacy :before pseudo-element in new-help mode */
.focus-help-new-help .focus-help-new-window:before {
	content: none;
	display: none;
}

.focus-help-new-help .focus-help-new-window {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-family: system-ui, -apple-system, sans-serif;
	font-weight: 450;
	color: #64648b;
	text-decoration: none;
	padding: 6px 10px;
	border-radius: 4px;
	transition: color 150ms cubic-bezier(0.16, 1, 0.3, 1),
	            background 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-help-new-help .focus-help-new-window:hover {
	color: #3d5af1;
	background: #eef0ff;
}

.focus-help-new-help .focus-help-new-window svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* Share button — a <button>, styled to match the new-window action */
.focus-help-new-help .focus-help-share {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-family: system-ui, -apple-system, sans-serif;
	font-weight: 450;
	color: #64648b;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 4px;
	transition: color 150ms cubic-bezier(0.16, 1, 0.3, 1),
	            background 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-help-new-help .focus-help-share:hover {
	color: #3d5af1;
	background: #eef0ff;
}

.focus-help-new-help .focus-help-share svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.focus-help-new-help .focus-help-share.copied {
	color: #1a7f47;
	background: #e6f5ec;
}

.focus-help-new-help .focus-help-share.copy-failed {
	color: #c0392b;
	background: #fdecea;
}

/* Body — holds iframes */
.focus-help-body {
	flex: 1;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.focus-help-new-help .focus-help-iframe {
	width: 100%;
	height: 100%;
	border: none;
	position: absolute;
	top: 0;
	left: 0;
}

.focus-help-iframe-district {
	display: none;
}
