/**
 * HeaderShield Admin Styles
 * Palette: Navy #1a2535 · Navy-mid #2c3e5a · Blue #2271b1 · Blue-tint #eef4fb
 * Sizing: rem/em for scalability (browser base typically 16px).
 */

/* =========================================================================
   Page header (shared — settings + guide)
   Clear bar so it’s visible and consistent on both pages.
   ========================================================================= */

.wrap .hs-page-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.25rem 0;
	padding: 1.25rem 1.5rem;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 0.5rem;
	box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.06);
}

.wrap .hs-page-header-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	line-height: 0;
}

.wrap .hs-page-header-icon svg {
	display: block;
}

.wrap .hs-page-header-text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.wrap .hs-page-header-title {
	font-size: 1.4375rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	padding: 0;
	border: none;
	letter-spacing: -0.02em;
}

.wrap .hs-title-dark {
	color: #1a2535;
}

.wrap .hs-title-blue {
	color: #2271b1;
}

.wrap .hs-page-header-sub {
	color: #50575e;
	font-size: 0.8125rem;
	margin: 0;
	line-height: 1.4;
}

/* =========================================================================
   Page wraps
   ========================================================================= */

.hs-settings-wrap,
.hs-guide-wrap {
	max-width: 68.75rem;
	margin-top: 1rem;
}

/* =========================================================================
   Two-column layout (settings page only)
   ========================================================================= */

.hs-page-body {
	display: flex;
	align-items: flex-start;
	gap: 1.25rem;
	margin-top: 1.25rem;
}

.hs-main-col {
	flex: 1 1 0;
	min-width: 0;
}

.hs-sidebar {
	flex: 0 0 16.5625rem;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

/* =========================================================================
   Form panel
   ========================================================================= */

.hs-form-panel {
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 0.5rem;
	overflow: hidden;
}

.hs-form-panel-inner {
	padding: 0 1.5rem;
}

.hs-form-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75rem 1.5rem;
	padding: 1.125rem 0;
	border-bottom: 1px solid #f0f0f0;
}

.hs-form-row:last-child {
	border-bottom: none;
}

.hs-form-label {
	flex: 0 0 10.9375rem;
	font-weight: 600;
	font-size: 0.8125rem;
	color: #1d2327;
	padding-top: 0.25rem;
}

.hs-form-field {
	flex: 1 1 15rem;
	min-width: 0;
}

/* -------------------------------------------------------------------------
   Toggle switch (replaces native checkbox)
   ------------------------------------------------------------------------- */

.hs-toggle {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	cursor: pointer;
	user-select: none;
}

/* Visually hide the native checkbox but keep it accessible */
.hs-toggle input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}

/* The toggle pill track */
.hs-toggle-track {
	position: relative;
	flex-shrink: 0;
	width: 2.625rem;
	height: 1.5rem;
	background: #c3c4c7;
	border-radius: 0.75rem;
	transition: background 0.2s ease;
}

/* The sliding thumb */
.hs-toggle-track::after {
	content: '';
	position: absolute;
	top: 0.25rem;
	left: 0.25rem;
	width: 1rem;
	height: 1rem;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease;
}

/* Checked state */
.hs-toggle input[type="checkbox"]:checked + .hs-toggle-track {
	background: #2271b1;
}

.hs-toggle input[type="checkbox"]:checked + .hs-toggle-track::after {
	transform: translateX(1.125rem);
}

/* Keyboard focus ring on the track */
.hs-toggle input[type="checkbox"]:focus-visible + .hs-toggle-track {
	outline: 0.125rem solid #2271b1;
	outline-offset: 0.125rem;
}

.hs-form-field .description {
	margin: 0.5rem 0 0;
	color: #646970;
	font-size: 0.78125rem;
	line-height: 1.55;
}

/* -------------------------------------------------------------------------
   SlimSelect overrides — match navy/blue palette
   ------------------------------------------------------------------------- */

.ss-content .ss-search input {
	border-color: #c3c4c7;
	border-radius: 0.25rem;
}

.ss-content .ss-search input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 0.125rem rgba(34, 113, 177, 0.15);
	outline: none;
}

.ss-content .ss-option.ss-highlighted,
.ss-content .ss-option:hover {
	background: #eef4fb;
	color: #1a2535;
}

.ss-content .ss-option.ss-selected {
	background: #2271b1;
	color: #fff;
}

/* Values (selected tags in the control) */
.ss-single-selected .placeholder,
.ss-multi-selected .ss-values .ss-value {
	background: #eef4fb;
	border: 1px solid #c5d9f0;
	color: #1a3a5c;
	border-radius: 0.25rem;
}

.ss-multi-selected .ss-values .ss-value .ss-value-delete {
	border-left-color: #c5d9f0;
}

/* Control border */
.ss-main {
	border-color: #c3c4c7;
	border-radius: 0.375rem;
}

.ss-main:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 0.125rem rgba(34, 113, 177, 0.15);
}

/* =========================================================================
   Important notice (below form)
   ========================================================================= */

.hs-important-notice {
	background: #fef9ec;
	border: 1px solid #f0d49a;
	border-radius: 0.375rem;
	padding: 0.8125rem 1.125rem;
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	font-family: inherit;
	white-space: normal;
	line-height: 1.5;
	color: #5c4000;
}

/* =========================================================================
   Save button
   ========================================================================= */

.hs-btn-save {
	display: inline-block;
	background: #1a2535;
	color: #ffffff;
	border: 0.125rem solid #1a2535;
	border-radius: 0.375rem;
	padding: 0.625rem 1.625rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	margin-top: 0.875rem;
	letter-spacing: 0.00625rem;
}

.hs-btn-save:hover,
.hs-btn-save:focus {
	background: #2c3e5a;
	border-color: #2c3e5a;
	color: #ffffff;
	outline: 0.125rem solid #2271b1;
	outline-offset: 0.125rem;
}

/* =========================================================================
   Sidebar — guide link
   ========================================================================= */

.hs-sidebar-guide-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	background: #eef4fb;
	border: 1px solid #c5d9f0;
	border-radius: 0.5rem;
	padding: 0.875rem 1rem;
	text-decoration: none;
	color: #1a2535;
	transition: background 0.14s ease;
}

.hs-sidebar-guide-link:hover,
.hs-sidebar-guide-link:focus {
	background: #dce9f8;
	color: #1a2535;
	text-decoration: none;
}

.hs-sidebar-guide-link-icon {
	font-size: 1.375rem;
	line-height: 1;
	flex-shrink: 0;
}

.hs-sidebar-guide-link-text {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
}

.hs-sidebar-guide-link-text small {
	display: block;
	font-weight: 400;
	color: #50575e;
	font-size: 0.75rem;
	margin-top: 0.1875rem;
}

/* =========================================================================
   Sidebar — quick notes widget
   ========================================================================= */

.hs-sidebar-widget {
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 0.5rem;
	overflow: hidden;
}

.hs-sidebar-widget-head {
	background: #2c3e5a;
	color: #ffffff;
	padding: 0.5625rem 1rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04375rem;
	text-transform: uppercase;
}

.hs-sidebar-widget-body {
	padding: 0.875rem 1rem;
}

.hs-quick-notes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.hs-quick-notes li {
	font-size: 0.78125rem;
	color: #3c434a;
	line-height: 1.55;
}

.hs-quick-notes li code {
	display: block;
	margin-top: 0.375rem;
	background: #f0f0f1;
	padding: 0.3125rem 0.5rem;
	border-radius: 0.25rem;
	font-size: 0.71875rem;
	color: #1d2327;
	word-break: break-all;
}

/* =========================================================================
   Guide page — two-column layout (main + sidebar), section cards
   ========================================================================= */

.hs-guide-wrap {
	max-width: 68.75rem;
	margin-top: 1.25rem;
}

.hs-guide-page-body {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	margin-top: 1.25rem;
}

.hs-guide-main {
	flex: 1 1 0;
	min-width: 0;
	font-size: 0.875rem;
	line-height: 1.65;
	color: #1d2327;
}

.hs-guide-lead {
	font-size: 0.9375rem;
	color: #50575e;
	margin: 0 0 1.5rem;
	line-height: 1.6;
}

/* Section cards — each topic in its own block */
.hs-guide-sec {
	margin-bottom: 1.5rem;
}

.hs-guide-sec:last-child {
	margin-bottom: 0;
}

.hs-guide-sec--card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 0.5rem;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.04);
}

.hs-guide-sec-title {
	margin: 0 0 0.75rem;
	font-size: 1.0625rem;
	font-weight: 700;
	color: #1a2535;
	line-height: 1.35;
}

.hs-guide-sec p {
	margin: 0 0 0.75rem;
	color: #3c434a;
}

.hs-guide-sec h3 {
	margin: 1.25rem 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1d2327;
}

.hs-guide-sec h3:first-of-type {
	margin-top: 0;
}

.hs-guide-sec ul {
	margin: 0.5rem 0 0.75rem;
	padding-left: 1.5em;
}

.hs-guide-sec ul li {
	margin: 0.25rem 0;
}

.hs-guide-checklist {
	list-style: none;
	padding-left: 0;
}

.hs-guide-checklist li {
	position: relative;
	padding-left: 1.5em;
	margin: 0.375rem 0;
}

.hs-guide-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #00a32a;
	font-weight: 700;
}

/* Tags (Advanced, Be careful) */
.hs-guide-tag {
	display: inline-block;
	background: #1a2535;
	color: #fff;
	padding: 0.125rem 0.5rem;
	border-radius: 0.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
	margin-left: 0.375rem;
	vertical-align: middle;
}

/* Callouts */
.hs-guide-callout {
	padding: 0.75rem 1rem;
	margin: 0.875rem 0;
	border-radius: 0.375rem;
	font-size: 0.8125rem;
	line-height: 1.55;
}

.hs-guide-callout--info {
	background: #eef4fb;
	border: 1px solid #c5d9ed;
	color: #1a3a5c;
}

.hs-guide-callout--warning {
	background: #fcf9e8;
	border: 1px solid #e6db99;
	color: #5c4000;
}

.hs-guide-callout--warning strong {
	color: #3d2e00;
}

/* Code block */
.hs-guide-code {
	background: #f6f7f8;
	border: 1px solid #dcdcde;
	border-radius: 0.375rem;
	padding: 0.75rem 1rem;
	overflow-x: auto;
	font-size: 0.8125rem;
	margin: 0.75rem 0;
}

.hs-guide-code code {
	background: none;
	padding: 0;
	font-family: Consolas, Monaco, monospace;
	color: #1d2327;
}

/* Guide sidebar — sticky TOC + Back link */
.hs-guide-sidebar {
	flex: 0 0 16.5625rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: sticky;
	top: 2rem;
}

.hs-guide-back {
	display: block;
	padding: 0.5rem 0.75rem;
	background: #eef4fb;
	border: 1px solid #c5d9f0;
	border-radius: 0.375rem;
	font-size: 0.8125rem;
	color: #2271b1;
	text-decoration: none;
	font-weight: 500;
	text-align: center;
}

.hs-guide-back:hover,
.hs-guide-back:focus {
	background: #dce9f8;
	color: #135e96;
	text-decoration: none;
}

.hs-guide-toc {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 0.5rem;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.hs-guide-toc-title {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #646970;
	margin-bottom: 0.25rem;
}

.hs-guide-toc a {
	font-size: 0.8125rem;
	color: #2271b1;
	text-decoration: none;
	padding: 0.375rem 0.5rem;
	border-radius: 0.25rem;
	line-height: 1.35;
}

.hs-guide-toc a:hover,
.hs-guide-toc a:focus {
	background: #f0f6fc;
	color: #135e96;
}

/* =========================================================================
   Responsive — sidebars stack below on small screens
   ========================================================================= */

@media screen and (max-width: 55rem) {
	.hs-page-body,
	.hs-guide-page-body {
		flex-direction: column;
	}

	.hs-sidebar,
	.hs-guide-sidebar {
		flex: 1 1 auto;
		width: 100%;
		position: static;
	}
}
