/**
 * E-Moxie Infinite Scroll Comments — front-end styles.
 *
 * Ported from the legacy inline styles and namespaced under `eisc-`.
 * Colors reuse the TagDiv Newspaper theme CSS variables so the accordion
 * matches the surrounding template.
 *
 * Override the sticky-header scroll offset per site with, e.g.:
 *   .eisc-comments { --eisc-scroll-offset: 120px; }
 */

.eisc-comments {
	--eisc-scroll-offset: 100px;
	scroll-margin-top: var(--eisc-scroll-offset);
}

/* Header ------------------------------------------------------------------ */

.eisc-comments__heading {
	margin: 0;
	padding: 0;
}

.eisc-comments__toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: -10px 0 22px;
	padding: 0;
	border: 0;
	background: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	text-align: left;
	font-family: var(--meta-buttons) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 37px !important;
	color: var(--secondary) !important;
}

/* Full-width divider under the header. */
.eisc-comments__toggle::before {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: #f5f5f5;
}

/* Short accent underline in the theme's secondary color. */
.eisc-comments__toggle::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	width: 50px;
	height: 2px;
	background-color: var(--secondary) !important;
}

.eisc-comments__toggle:focus-visible {
	outline: 2px solid var(--secondary, #005177);
	outline-offset: 3px;
}

.eisc-comments__label {
	flex: 1 1 auto;
}

.eisc-comments__arrow {
	flex: 0 0 auto;
	margin-left: 10px;
	font-size: 14px;
	transition: transform 0.3s ease;
}

.eisc-comments__toggle[aria-expanded="true"] .eisc-comments__arrow {
	transform: rotate(180deg);
}

/* Panel ------------------------------------------------------------------- */

.eisc-comments__panel[hidden] {
	display: none;
}

/* Keep in-panel anchor targets clear of a sticky header when scrolled to. */
.eisc-comments__panel,
.eisc-comments__panel :target,
.eisc-comments__panel [id^="comment-"],
.eisc-comments__panel #respond {
	scroll-margin-top: var(--eisc-scroll-offset);
}

/* Logged-out members prompt ---------------------------------------------- */

.eisc-comments-login {
	text-align: center;
}

.eisc-comments-login__text {
	display: block;
	margin-bottom: 10px;
	text-align: center !important;
	color: #000;
	font-family: var(--meta-buttons) !important;
	font-size: 14px !important;
}

.eisc-comments-login__actions {
	display: block;
	margin: 0;
}

.eisc-comments-login__button,
.eisc-comments-login__register {
	display: inline-block;
	margin: 5px;
	padding: 12px 20px;
	line-height: 1;
	border-radius: 3px;
	text-decoration: none;
	font-family: var(--meta-buttons) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	transition: background 0.3s ease, color 0.3s ease;
}

.eisc-comments-login__button {
	background-color: var(--highlight);
	color: #fff;
}

.eisc-comments-login__button:hover,
.eisc-comments-login__button:focus {
	background: #000;
	color: #fff;
}

.eisc-comments-login__register {
	background: transparent;
	color: var(--secondary) !important;
	border: 1px solid currentColor;
}

.eisc-comments-login__register:hover,
.eisc-comments-login__register:focus {
	background: var(--secondary);
	color: #fff !important;
}
