/*
Theme Name: Spiritalis
Description: Child theme for Spiritalis platform - Spiritism Study Engine
Author: R.Project Web Studio
Template: astra
Version: 1.0.0
Text Domain: spiritalis
Domain Path: /languages
*/

/*
 * Parent theme styles are automatically enqueued via functions.php
 * Add custom styles below as needed
 */

/* ==========================================================================
   Breakpoint Reference
   ========================================================================== */

/*
 * Breakpoint values used throughout this stylesheet:
 * - 544px (max-width) - Astra mobile breakpoint (hardcoded, not customizable)
 *   - Used for: Astra inline CSS padding at 544px breakpoint
 *   - Note: Astra's mobile breakpoint is 544px, but we use 768px for
 *     better tablet/mobile distinction and/or when needed.
 *
 * 768px (max-width) - Mobile
 *   - Primary mobile breakpoint for most component adjustments
 *   - Used for: item markers, item content, reference titles, navigation,
 *     filters, sibling titles, auth banner
 *   - Note: Astra's mobile breakpoint is 544px, but we use 768px for
 *     better tablet/mobile distinction
 *
 * 782px (max-width) - WordPress Admin Bar Mobile
 *   - WordPress admin bar height changes from 32px to 46px at this breakpoint
 *   - Used for: details panel, filters sticky positioning, auth banner
 *   - Specific to WordPress admin bar, not Astra breakpoints
 *
 * 922px (min-width) - Astra Tablet/Header Breakpoint
 *   - Astra's default tablet breakpoint (921px for new users, 768px for older)
 *   - Used for: Astra grid layout fixes
 *   - Can be customized in: Appearance → Customize → Header → Primary Menu
 *     → "Menu Breakpoint"
 *
 * 1200px (max-width) - Tablet Marker Strip
 *   - Custom breakpoint for marker strip expanded behavior
 *   - Used for: always-expanded marker strip on tablets and smaller screens
 *   - Custom value, not related to Astra breakpoints
 *
 * Additional Notes:
 * - Astra tablet breakpoint: 921px (new users) or 768px (older users)
 * - Astra mobile breakpoint: 544px (hardcoded, not customizable)
 * - These values match Astra's defaults but are hardcoded for compatibility
 */

/* ==========================================================================
   Global Styles
   ========================================================================== */

/* Override default Astra container padding */
/*
.ast-container, .ast-container-fluid {
	padding-left: 24px;
	padding-right: 24px;
}
*/

/* Global content area primary margin-top (all pages) */
#primary {
	margin-top: 2rem;
}

/* Override default Spectra container padding */
.wp-block-spectra-container {
	padding: 0;
}

@media (max-width: 544px) {
	/* Override Astra's inline CSS padding at 544px breakpoint */
	.ast-separate-container #content .ast-container {
		padding-left: 15px;
		padding-right: 15px;
	}
}

/* Neutral text selection – overrides Astra’s accent-based selection */
::selection {
  background-color: #ececec;
  color: #171717;
}

::-moz-selection {
  background-color: #ececec;
  color: #171717;
}

/* Disable tap highlight globally for custom interactive elements */
* {
	-webkit-tap-highlight-color: transparent;
}

/* Scroll padding for anchor links - accounts for fixed header */
html {
	scroll-padding-top: 30px;
	scroll-behavior: smooth;
}

/* Astra buttons styles applied to anchor links */
a.ast-button,
a.ast-outline-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border-style: solid;
}

blockquote {
	margin-left: 0;
}

ol.wp-block-list, ul.wp-block-list {
	padding-left: 1.5em;
}

/* Remove bottom margin from last paragraph in content areas */
article p:last-child,
section p:last-child,
blockquote p:last-child {
	margin-bottom: 0;
}

sup {
	font-size: 80%;
	font-weight: 700;
}

/* ==========================================================================
   SSE Boxed Container - Shared container styles for main/outer containers
   ========================================================================== */

.sse-boxed-container {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
}

.sse-term-content {
	margin: 2rem 0;
	padding: 1.5rem 2rem;
}

.sse-term-footer {
	margin-top: 3rem;
	padding: 1.5rem 2rem;
}

@media (max-width: 768px) {
	.sse-term-content, .sse-term-footer {
		padding: 1.5rem 1rem;
	}
}

/* ==========================================================================
   Header
   ========================================================================== */

/* Hide "Create Account" button when logged in */
.logged-in #ast-desktop-header .ast-header-button-1,
.logged-in #ast-mobile-popup .ast-header-button-1 {
	display: none;
}

/* Adjust secondary menu padding when logged in */
.logged-in #ast-desktop-header .ast-builder-menu-2 {
	padding-right: 0;
}

/* Responsive styles for header */
@media screen and (min-width: 922px) and (max-width: 1210px) {
	.site-primary-header-wrap > .ast-builder-grid-row {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}

	.site-primary-header-wrap > .ast-builder-grid-row .site-header-section {
		height: auto;
	}

	.site-primary-header-wrap > .ast-builder-grid-row .site-header-primary-section-left,
	.site-primary-header-wrap > .ast-builder-grid-row .site-header-primary-section-left > .ast-builder-layout-element,
	.site-primary-header-wrap > .ast-builder-grid-row .site-header-primary-section-left > .ast-builder-layout-element .site-branding {
		width: 100%;
	}

	.site-primary-header-wrap > .ast-builder-grid-row .site-header-primary-section-left > .ast-builder-layout-element .site-branding {
		justify-content: center;
		padding-bottom: 0;
	}

	.site-primary-header-wrap .site-logo-img {
		padding-right: 0;
	}
}

/* ==========================================================================
   Menu Link Icons
   ========================================================================== */

/* Base styles for menu links with icons */
.menu-link-icon > .menu-link,
.menu-link-icon.menu-link {
	display: inline-flex !important;
	align-items: center;
	gap: 0.25rem;
}

.menu-link-icon > .menu-link::before,
.menu-link-icon.menu-link::before,
.menu-link-icon > .menu-link::after,
.menu-link-icon.menu-link::after {
	font-family: dashicons;
	font-size: 1.2em;
	line-height: 1;
	vertical-align: middle;
}

.menu-icon-migrate-before > .menu-link::before,
.menu-icon-migrate-before.menu-link::before {
	content: "\f310"; /* dashicons-migrate */
}

.menu-icon-migrate-after > .menu-link::after,
.menu-icon-migrate-after.menu-link::after {
	content: "\f310"; /* dashicons-migrate */
}

.menu-icon-welcome-widgets-menus-before > .menu-link::before,
.menu-icon-welcome-widgets-menus-before.menu-link::before {
	content: "\f116"; /* dashicons-welcome-widgets-menus */
}

.menu-icon-admin-users-before > .menu-link::before,
.menu-icon-admin-users-before.menu-link::before {
	content: "\f110"; /* dashicons-admin-users */
}

.menu-icon-book-alt-before > .menu-link::before,
.menu-icon-book-alt-before.menu-link::before {
	content: "\f331"; /* dashicons-book-alt */
}

.menu-icon-info-outline-before > .menu-link::before,
.menu-icon-info-outline-before.menu-link::before {
	content: "\f14c"; /* dashicons-info-outline */
}

.menu-icon-heart-before > .menu-link::before,
.menu-icon-heart-before.menu-link::before {
	content: "\f487"; /* dashicons-heart */
}

.menu-icon-format-chat-before > .menu-link::before,
.menu-icon-format-chat-before.menu-link::before {
	content: "\f125"; /* dashicons-format-chat */
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.sse-breadcrumbs {
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
}

.sse-breadcrumbs-list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.5rem;
}

.sse-breadcrumbs-item {
	display: flex;
	align-items: center;
}

.sse-breadcrumbs-item:not(:last-child)::after {
	content: "›";
	margin-left: 0.5rem;
	color: #999;
}

.sse-breadcrumbs-item [aria-current="page"] {
	color: #666;
}

/* ==========================================================================
   Home Page
   ========================================================================== */

.home .ast-primary-header-bar {
	background-color: transparent;
}

.home #content {
	margin-top: calc(-84px - 2rem);
}

/* ==========================================================================
   Reference Archive
   ========================================================================== */

.sse-ref-content {
	margin: 0 auto;
}

.sse-ref-header {
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #eee;
}

.sse-ref-title {
	margin-bottom: 0.5rem;
}

.sse-ref-description {
	margin-bottom: 1rem;
	color: #666;
}

.sse-ref-meta {
	font-size: 0.75rem;
	color: #999;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.sse-item-count {
	display: inline-block;
}

.sse-progress {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--ast-global-color-0, #5390d9);
	font-weight: 500;
}

.sse-progress-text {
	min-width: 135px;
	text-align: right;
	white-space: nowrap;
}

.sse-progress-bar {
	display: inline-block;
	width: 300px;
	height: 12px;
	background-color: #e0e0e0;
	border-radius: 3px;
	overflow: hidden;
	vertical-align: middle;
}

.sse-progress-bar-fill {
	display: block;
	height: 100%;
	background-color: var(--ast-global-color-0, #5390d9);
	border-radius: 3px;
	transition: width 0.3s ease;
}

/* Progress bar at 100% - completed state */
.sse-progress-bar-fill[style*="width: 100%"],
.sse-progress-bar-fill[style="width: 100%;"] {
	background-color: #28a745;
}

/* Stat indicators (important, notes) */
.sse-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.85rem;
	color: #666;
}

.sse-stat .dashicons {
	font-size: 1rem;
	width: 1rem;
	height: 1rem;
}

.sse-stat-important .dashicons {
	color: #f0ad4e;
}

.sse-stat-notes .dashicons {
	color: var(--ast-global-color-0, #5390d9);
}

/* Disabled/empty state - icons match text color */
.sse-stat.is-empty .dashicons,
.sse-term-card-stat.is-empty .dashicons {
	color: #666;
}

.sse-stat-text {
	font-weight: 500;
	white-space: nowrap;
}

.sse-ref-body {
	margin: 2rem 0;
}

/* Reference Archive - Responsive */
@media (max-width: 1200px) {
	.sse-progress {
		order: 0;
		width: 100%;
	}

	.sse-item-count {
		order: 1;
	}

	.sse-stat {
		order: 2;
	}

	.sse-progress-text {
		min-width: initial;
		text-align: initial;
	}

	.sse-progress-bar {
		width: 100%;
	}
}

@media (max-width: 544px) {
	.sse-item-count {
		display: none;
	}

	.sse-ref-title {
		font-size: 2rem;
	}

	.sse-ref-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
}

/* ==========================================================================
   SSE Filters Bar
   ========================================================================== */

.sse-filters {
	margin-bottom: 2rem;
	z-index: 10;
	padding: 0.75rem;
}

.sse-filters-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

/* Sticky state - enables sticky positioning when search has content */
.sse-filters.is-sticky {
	position: sticky;
	top: 0;
}

/* Account for WP admin bar when logged in */
.admin-bar .sse-filters.is-sticky {
	top: 32px;
}

/* Stuck state - visual styles when actually stuck to top */
.sse-filters.is-stuck {
	border-top: 0;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

/* Sentinel element (invisible) */
.sse-filters-sentinel {
	height: 0;
	pointer-events: none;
}

.sse-item-search-input[type="search"] {
	width: 100%;
	max-width: 500px;
	padding: 0.5rem;
	border-radius: 5px;
	font-size: 0.9rem;
	line-height: 1.125rem;
}

.sse-item-search-input[type="search"]:focus {
	outline: none;
	border-style: solid;
	border-color: var(--ast-global-color-0, #5390d9);
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Search input error/warning states (no visible matches) */
.sse-item-search-input.has-error {
	border-color: var(--wp--preset--color--ast-global-color-1, #e44b43);
	box-shadow: 0 0 0 2px rgba(179, 45, 46, 0.2);
}

.sse-item-search-input.has-error:focus {
	border-color: var(--wp--preset--color--ast-global-color-1, #e44b43);
	box-shadow: 0 0 0 2px rgba(179, 45, 46, 0.25);
}

.sse-item-search-input.has-warning {
	border-color: #dba617;
	box-shadow: 0 0 0 2px rgba(219, 166, 23, 0.2);
}

.sse-item-search-input.has-warning:focus {
	border-color: #dba617;
	box-shadow: 0 0 0 2px rgba(219, 166, 23, 0.25);
}

/* Search result message (below .sse-filters-inner) */
.sse-filters-messages {
	width: 100%;
	margin-top: 0.75rem;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
}

.sse-filters-message-error {
	color: var(--wp--preset--color--ast-global-color-1, #e44b43);
}

.sse-filters-message-warning {
	color: #b86b00;
}

/* Search highlight (mark.js) */
.sse-items-list mark {
	background-color: rgba(255, 213, 0, 0.4);
	color: inherit;
	padding: 0.1em 0.2em;
	border-radius: 2px;
	scroll-margin-top: 150px; /* Offset for sticky header when scrolling to match */
}

/* WP admin bar is taller on mobile (46px vs 32px) */
@media screen and (max-width: 782px) {
	.admin-bar .sse-filters.is-sticky {
		top: 46px;
	}
}

/* Filter dropdowns (member-only) */
.sse-filter-dropdowns {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sse-filter-group {
	display: flex;
	align-items: center;
}

.sse-filter-select {
	padding: 0.5rem;
	padding-right: 1.75rem;
	border: 1px solid var(--ast-border-color, #e0e0e0);
	border-radius: 5px;
	font-size: 0.9rem;
	line-height: 1.125rem;
	color: var(--ast-global-color-3, #333);
	cursor: pointer;
	min-width: 100px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
}

.sse-filter-select:hover {
	border-color: var(--ast-global-color-0, #5390d9);
}

.sse-filter-select:focus {
	outline: none;
	border-color: var(--ast-global-color-0, #5390d9);
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Active filter indicator (class toggled via JS; CSS cannot read select value) */
.sse-filter-select.is-active {
	border-color: var(--ast-global-color-0, #5390d9);
	background-color: rgba(0, 115, 170, 0.05);
}

/* Empty state */
.sse-empty-state {
	text-align: center;
	padding: 3rem 1.5rem;
	margin-left: 1.5rem;
	margin-bottom: 2rem;
}

.sse-empty-state-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.sse-empty-state .dashicons {
	font-size: 3rem;
	width: 3rem;
	height: 3rem;
	color: var(--ast-global-color-3, #888);
	opacity: 0.5;
}

.sse-empty-state-text {
	margin: 0;
	font-size: 1rem;
	color: var(--ast-global-color-3, #666);
}

.sse-clear-filters-btn {
	padding: 0.5rem 1rem;
	border: 1px solid var(--ast-global-color-0, #5390d9);
	border-radius: 5px;
	background-color: transparent;
	color: var(--ast-global-color-0, #5390d9);
	font-size: 0.875rem;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.sse-clear-filters-btn:hover {
	background-color: var(--ast-global-color-0, #5390d9);
	color: #ffffff;
}

/* Mobile filters adjustments */
@media (max-width: 1600px) {
	body.sse-notes-panel-open .sse-filters-inner {
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	body.sse-notes-panel-open .sse-item-search-input[type="search"] {
		max-width: 100%;
		flex: 1 1 100%;
	}

	body.sse-notes-panel-open .sse-filter-dropdowns {
		flex: 1 1 100%;
		margin-left: 0;
		margin-top: 0.5rem;
		justify-content: flex-start;
	}

	body.sse-notes-panel-open .sse-filter-group {
		flex-grow: 1;
	}

	body.sse-notes-panel-open .sse-filter-select {
		flex: 1;
		min-width: 0;
	}
}

@media (max-width: 922px) {
	.sse-filters.is-sticky {
		position: static;
	}

	.sse-filters-inner {
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.sse-item-search-input[type="search"] {
		max-width: 100%;
		flex: 1 1 100%;
	}

	.sse-filter-dropdowns {
		flex: 1 1 100%;
		margin-left: 0;
		margin-top: 0.5rem;
		justify-content: flex-start;
	}

	.sse-filter-group {
		flex-grow: 1;
	}

	.sse-filter-select {
		flex: 1;
		min-width: 0;
	}
}

@media (max-width: 768px) {
	.sse-filter-dropdowns {
		flex-direction: column;
		margin-top: initial;
	}

	.sse-filter-group {
		width: 100%;
	}
}

/* ==========================================================================
   Hierarchical Sections (Recursive Term Display)
   ========================================================================== */

.sse-ref-section {
	margin: 2rem 0;
}

/* Section Header */
.sse-section-header {
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e0e0e0;
}

.sse-section-title {
	margin: 0 0 0.5rem 0;
	color: #333;
}

.sse-section-description {
	color: #666;
	font-size: 0.95rem;
}

/* Section Content (Term Intro) */
.sse-section-content {
	margin: 1.5rem 0;
	padding: 1.25rem;
	background: #f9f9f9;
	border-left: 3px solid #6c757d;
}

/* Section Footer */
.sse-section-footer {
	margin-top: 2rem;
	padding: 1rem;
	background: #f9f9f9;
	border-top: 1px solid #ddd;
	font-size: 0.9rem;
}

/* ==========================================================================
   Container Layout (Navigation Cards)
   ========================================================================== */

.sse-ref-container .sse-ref-navigation {
	margin: 2rem 0;
}

.sse-term-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sse-term-list-item {
	margin-bottom: 1rem;
}

.sse-term-card {
	display: flex;
	flex-direction: column;
	padding: 1.25rem 1.5rem;
	text-decoration: none;
	color: inherit;
	position: relative;
}

.sse-term-card:hover {
	border-color: var(--ast-global-color-0, #5390d9);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.sse-term-card-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.25rem;
	transition: color 0.2s;
}

.sse-term-card:hover .sse-term-card-title {
	color: var(--ast-global-color-0, #5390d9);
}

.sse-term-card-description {
	font-size: 0.9rem;
	color: #666;
	line-height: 1.4;
	margin-bottom: 0.5rem;
}

.sse-term-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	font-size: 0.85rem;
	color: #999;
}

.sse-term-card-count {
	white-space: nowrap;
}

.sse-term-card-progress {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.sse-term-card-progress-text {
	color: var(--ast-global-color-0, #5390d9);
	font-weight: 500;
	font-size: 0.8rem;
}

.sse-term-card-progress-bar {
	width: 150px;
	height: 8px;
	background-color: #e0e0e0;
	border-radius: 2px;
	overflow: hidden;
}

.sse-term-card-progress-bar-fill {
	display: block;
	height: 100%;
	background-color: var(--ast-global-color-0, #5390d9);
	border-radius: 2px;
	transition: width 0.3s ease;
}

/* Progress bar at 100% - completed state */
.sse-term-card-progress-bar-fill[style*="width: 100%"],
.sse-term-card-progress-bar-fill[style="width: 100%;"] {
	background-color: #28a745;
}

/* Term card stat indicators (important, notes) */
.sse-term-card-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	font-size: 0.8rem;
}

.sse-term-card-stat .dashicons {
	font-size: 0.9rem;
	width: 0.9rem;
	height: 0.9rem;
}

.sse-term-card-stat .sse-stat-text {
	font-weight: 500;
	white-space: nowrap;
}

.sse-term-card-arrow {
	position: absolute;
	right: 1.5rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.25rem;
	display: inline-block;
	width: 1em;
	height: 1em;
	color: #ccc;
	transition:
		color 0.2s,
		transform 0.2s;
}

.sse-term-card:hover .sse-term-card-arrow {
	color: var(--ast-global-color-0, #5390d9);
	transform: translateY(-50%) translateX(4px);
}

/* ==========================================================================
   Leaf Layout (Study Page)
   ========================================================================== */

.sse-ref-leaf .sse-items-list {
	margin: 2rem 0;
}

/* ==========================================================================
   Sibling Navigation (Prev/Next)
   ========================================================================== */

.sse-sibling-navigation {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid #eee;
	gap: 1rem;
}

.sse-sibling-link {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 1rem 1.5rem;
	text-decoration: none;
	color: inherit;
	transition:
		background-color 0.2s,
		border-color 0.2s,
		box-shadow 0.2s;
	width: 50%;
	position: relative;
	gap: 1rem;
}

.sse-sibling-link:hover,
.sse-sibling-link:focus {
	outline: none;
	border-color: var(--ast-global-color-0, #5390d9);
	background: #ffffff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.sse-sibling-prev {
	justify-content: flex-start;
}

.sse-sibling-next {
	justify-content: flex-end;
}

.sse-sibling-icon {
	font-size: 1.5rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.5em;
	height: 1.5em;
	color: var(--ast-global-color-0, #5390d9);
	transition: transform 0.2s;
}

.sse-sibling-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.sse-sibling-prev .sse-sibling-content {
	align-items: flex-start;
	text-align: left;
}

.sse-sibling-next .sse-sibling-content {
	align-items: flex-end;
	text-align: right;
}

.sse-sibling-link:hover .sse-sibling-icon {
	transform: scale(1.1);
}

.sse-sibling-prev:hover .sse-sibling-icon {
	transform: translateX(-2px) scale(1.1);
}

.sse-sibling-next:hover .sse-sibling-icon {
	transform: translateX(2px) scale(1.1);
}

.sse-sibling-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #999;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.sse-sibling-title {
	font-size: 1rem;
	font-weight: 500;
	color: #333;
	transition: color 0.2s;
	line-height: 1.3;
	word-wrap: break-word;
}

.sse-sibling-link:hover .sse-sibling-title {
	color: var(--ast-global-color-0, #5390d9);
}

.sse-sibling-placeholder {
	flex: 1;
}

/* Sibling Navigation - Responsive */
@media (max-width: 768px) {
	.sse-sibling-title {
		font-size: 0.75rem;
	}
}

/* ==========================================================================
   SSE Item Display
   ========================================================================== */

/* Item Wrapper */
.sse-item-wrapper {
	position: relative;
	display: flex;
	align-items: stretch;
	margin-bottom: 2rem;
}

/* Affected by Notes panel: scroll wrapper below admin bar when opening */
.admin-bar .sse-item-wrapper {
	scroll-margin-top: 32px; /* admin bar height */
}

@media screen and (max-width: 782px) {
	.admin-bar .sse-item-wrapper {
		scroll-margin-top: 46px; /* mobile admin bar height */
	}
}

.sse-item-content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	flex: 1;
	min-width: 0;
}

/* Side Marker */
.sse-item-marker {
	position: relative;
	width: 24px;
	flex-shrink: 0;
	margin-right: 0;
	padding: 20px 0;
}

.sse-marker-strip {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0;
	width: 24px;
	overflow: hidden;
	transition:
		width 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
	border-radius: 4px 0 0 4px;
}

/* Marker Buttons */
.sse-marker-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	border-radius: 4px;
	transition:
		background-color 0.15s,
		transform 0.15s;
	opacity: 0.4;
	outline: none;
}

.sse-marker-btn:active,
.sse-marker-btn:focus,
.sse-marker-btn:focus-visible {
	background: transparent !important;
	outline: none;
}

/* Marker Icons */
.sse-marker-icon {
	font-size: 1rem;
	line-height: 1;
	color: var(--ast-global-color-3, #666);
	display: inline-block;
	width: 1em;
	height: 1em;
	transition:
		color 0.2s,
		font-size 0.2s;
}

/* Marker States */
/* First icon (read status) always slightly visible */
.sse-marker-read {
	opacity: 0.7;
}

/* Active states */
.sse-marker-read.is-active .sse-marker-icon {
	color: #28a745; /* Green checkmark - semantic color */
}

.sse-marker-important.is-active .sse-marker-icon {
	color: #f0ad4e; /* Gold star - semantic color */
}

.sse-marker-notes.has-notes .sse-marker-icon,
.sse-marker-notes.notes-panel-open .sse-marker-icon {
	color: var(--ast-global-color-0, #5390d9); /* Astra primary color */
}

/* Inactive state colors */
.sse-marker-btn:not(.is-active, .has-notes, .notes-panel-open) .sse-marker-icon {
	color: var(--ast-global-color-3, #999);
	opacity: 0.5;
}

/* Marker Hover Effects (Desktop only) */
@media (hover: hover) {
	/* Expand marker strip on hover */
	.sse-marker-strip:hover {
		width: 40px;
		background: #ffffff;
		border-radius: 4px;
		box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
	}

	.sse-marker-strip:hover .sse-marker-btn {
		opacity: 1;
	}

	.sse-marker-strip:hover .sse-marker-read {
		opacity: 1;
	}

	.sse-marker-strip:hover .sse-marker-icon {
		font-size: 1.25rem;
	}

	/* Make inactive icons more visible on hover */
	.sse-marker-strip:hover .sse-marker-btn .sse-marker-icon {
		color: var(--ast-global-color-2, #555);
		opacity: 1;
	}

	/* Restore active colors on hover */
	.sse-marker-strip:hover .sse-marker-read.is-active .sse-marker-icon {
		color: #28a745;
	}

	.sse-marker-strip:hover .sse-marker-important.is-active .sse-marker-icon {
		color: #f0ad4e;
	}

	.sse-marker-strip:hover .sse-marker-notes.has-notes .sse-marker-icon,
	.sse-marker-strip:hover .sse-marker-notes.notes-panel-open .sse-marker-icon {
		color: var(--ast-global-color-0, #5390d9);
	}

	/* Button hover effects */
	.sse-marker-btn:hover {
		background: inherit;
		transform: scale(1.25);
	}

	.sse-marker-btn:not(:hover) {
		background: transparent;
		transform: none;
	}
}

/* Item Content */
.sse-item {
	flex: 1;
	padding: 1.5rem 2rem;
}

.sse-item-header {
	margin-bottom: 0.75rem;
}

.sse-item-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0;
	color: #333;
}

/* Center align title in header for normal text format */
.sse-item-normal .sse-item-header .sse-item-title {
	text-align: center;
	flex-grow: 1;
}

.sse-item-title a {
	text-decoration: none;
	color: inherit;
}

.sse-item-title a:hover {
	color: var(--ast-global-color-0, #5390d9);
}

/* Item Format Styles */
/* QA Format */
.sse-qa-box blockquote {
	margin-right: 0;
	margin-bottom: 0;
}

.sse-item-qa .sse-leading-text {
	margin-bottom: 1rem;
	font-weight: 600;
	font-size: 1rem;
	color: #333;
}

.sse-item-qa .sse-main-content {
	margin-bottom: 0;
}

/* Normal Text Format */
.sse-item-normal .sse-leading-text,
.sse-item-normal .sse-main-content {
	margin-bottom: 1rem;
}

/* Author Notes */
.sse-author-notes {
	margin: 2rem 0 1rem;
	padding: 1.5rem;
	background: #eef4fb;
	border-left: 4px solid #044b85;
	border-radius: 4px;
}

.sse-author-notes-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-weight: 700;
	font-size: 1rem;
	color: #044b85;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sse-author-notes-icon {
	font-size: 1.5rem;
	line-height: 1;
	display: inline-block;
	width: 1em;
	height: 1em;
}

.sse-author-notes-label {
	line-height: 1;
}

.sse-author-notes-content {
	margin: 0;
	padding: 0;
	color: #044b85;
	font-size: 0.95rem;
}

/* Interpretation */
.sse-interpretation {
	margin: 2rem 0 1rem;
	padding: 1.5rem;
	background: #f9f9f9;
	border-left: 4px solid #666666;
	border-radius: 4px;
}

.sse-interpretation-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-weight: 700;
	font-size: 1rem;
	color: #666666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sse-interpretation-icon {
	font-size: 1.5rem;
	line-height: 1;
	display: inline-block;
	width: 1em;
	height: 1em;
}

.sse-interpretation-label {
	line-height: 1;
}

.sse-interpretation-content {
	margin: 0;
	padding: 0;
	color: #666666;
	font-size: 0.95rem;
}

/* User notes (read-only section - "Personal Notes") */
.sse-user-notes {
	margin: 2rem 0 1rem;
	padding: 1rem 1.5rem;
	background: #fffaf5;
	border-left: 4px solid #e9d9c9;
	border-radius: 4px;
}

/* Keep note container below admin bar when scrolled into view after save */
.admin-bar .sse-user-notes {
	scroll-margin-top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .sse-user-notes {
		scroll-margin-top: 46px;
	}
}

.sse-user-notes-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-weight: 700;
	font-size: 1rem;
	color: #996838;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sse-user-notes-icon {
	font-size: 1.5rem;
	line-height: 1;
	display: inline-block;
	width: 1em;
	height: 1em;
}

.sse-user-notes-label {
	line-height: 1;
}

.sse-user-notes-content {
	margin: 0;
	padding: 0;
	color: #996838;
	font-size: 0.95rem;
}

.sse-user-notes-content p:last-child {
	margin-bottom: 0;
}

/* Item Footer */
.sse-item-footer {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

.sse-footer-references {
	font-size: 0.9rem;
	color: #666;
}

/* SSE Item Display - Responsive */
@media (max-width: 1200px) {
	.sse-marker-strip {
		width: 40px;
		background: #ffffff;
		border-radius: 4px;
		box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
	}

	.sse-marker-strip .sse-marker-btn {
		opacity: 1;
	}

	.sse-marker-strip .sse-marker-btn:hover {
		background: transparent;
	}

	.sse-marker-strip .sse-marker-read {
		opacity: 1;
	}

	.sse-marker-strip .sse-marker-icon {
		font-size: 1.25rem;
	}

	.sse-marker-strip .sse-marker-btn .sse-marker-icon {
		opacity: 1;
	}
}

@media (max-width: 768px) {
	.sse-marker-strip {
		padding: 1rem 0;
		gap: 1rem;
	}

	.sse-item-marker {
		width: 20px;
	}

	.sse-marker-btn {
		width: 24px;
		height: 24px;
	}

	.sse-marker-strip .sse-marker-icon {
		font-size: 1.5rem;
	}

	.sse-item {
		padding-right: 1rem;
	}

	.sse-author-notes,
	.sse-interpretation,
	.sse-user-notes {
		border-radius: initial;
		margin-left: -2rem;
		margin-right: -1rem;
		padding-left: 2rem;
		padding-right: 0.75rem;
	}

	.sse-author-notes:last-child,
	.sse-interpretation:last-child,
	.sse-user-notes:last-child {
		border-bottom-left-radius: 10px;
		border-bottom-right-radius: 10px;
		margin-bottom: -1.5rem;
	}

	.sse-author-notes-header,
	.sse-interpretation-header,
	.sse-user-notes-header {
		font-size: 0.9rem;
	}
}

@media (hover: hover) and (max-width: 768px) {
	.sse-marker-strip:hover .sse-marker-icon {
		font-size: 1.5rem;
	}
}

/* ==========================================================================
   Single Item Navigation
   ========================================================================== */

.sse-item-navigation {
	display: flex;
	justify-content: space-between;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid #ddd;
}

.sse-nav-previous,
.sse-nav-next {
	flex: 1;
}

.sse-nav-previous {
	text-align: left;
}

.sse-nav-next {
	text-align: right;
}

.sse-nav-previous a,
.sse-nav-next a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.sse-nav-previous a:hover,
.sse-nav-next a:hover {
	color: var(--ast-global-color-0, #5390d9);
}

.sse-nav-label {
	display: block;
	font-size: 0.85rem;
	color: #666;
	margin-bottom: 0.25rem;
}

.sse-nav-title {
	display: block;
	font-weight: 500;
}

/* Single Item Navigation - Responsive */
@media (max-width: 768px) {
	.sse-item-navigation {
		flex-direction: column;
		gap: 1rem;
	}

	.sse-nav-previous,
	.sse-nav-next {
		text-align: left;
	}
}

/* ==========================================================================
   Topic Archive
   ========================================================================== */

.sse-topic-archive {
	margin: 2rem 0;
}

.sse-topic-header {
	margin-bottom: 2rem;
}

.sse-topic-title {
	font-size: 2rem;
	margin-bottom: 1rem;
}

.sse-topic-description {
	margin-bottom: 1rem;
	color: #666;
}

.sse-topic-reference {
	margin: 3rem 0;
	padding: 2rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
}

.sse-topic-reference-title {
	font-size: 1.5rem;
	margin: 0 0 0.5rem 0;
}

.sse-topic-reference-title a {
	text-decoration: none;
	color: inherit;
}

.sse-topic-reference-title a:hover {
	color: var(--ast-global-color-0, #5390d9);
}

.sse-topic-reference-count {
	margin: 0 0 1.5rem 0;
	color: #666;
	font-size: 0.9rem;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.sse-no-items {
	padding: 2rem;
	text-align: center;
	color: #666;
	font-style: italic;
}

/* ==========================================================================
   Notes: Sliding panel (desktop: pushes content left; mobile: full-screen overlay)
   ========================================================================== */

/* When notes panel is open: main content uses left portion, panel fills the rest. */
body.sse-notes-panel-open .ast-container {
	margin-left: 0;
	margin-right: 0;
}

/* Article when notes panel is open: highlight for active item (marker state). */
.sse-item.notes-panel-open {
	border: 2px solid var(--ast-global-color-0, #5390d9);
}

/* Notes panel: fixed right, slides in from off-screen. */
.sse-notes-edit-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	border-radius: initial;
	border-left: 1px solid #e0e0e0;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow: hidden;
}

.sse-notes-edit-panel.is-open {
	transform: translateX(0);
}

.sse-notes-panel-header {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #e0e0e0;
}

.sse-notes-panel-header-top {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sse-notes-panel-header .sse-user-notes-icon {
	flex-shrink: 0;
}

.sse-notes-panel-item-label {
	margin: 0;
	text-align: center;
	font-size: 0.9rem;
	color: var(--ast-global-color-3, #555);
}

.sse-notes-panel-title {
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sse-notes-panel-footer {
	flex-shrink: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
}

.sse-notes-panel-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sse-notes-delete {
	padding: 4px;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	cursor: pointer;
	color: #999;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sse-notes-delete .dashicons {
	font-size: 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
	line-height: 1;
}

.sse-notes-delete:hover {
	background: #f0f0f0;
	color: #333;
}

/* Delete confirmation: replaces actions when trash is clicked */
.sse-notes-delete-confirm {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sse-notes-delete-confirm-text {
	font-size: 0.7rem;
	color: var(--wp--preset--color--ast-global-color-1, #e44b43);
}

.sse-notes-delete-confirm-yes:disabled,
.sse-notes-delete-confirm-cancel:disabled {
	opacity: 0.8;
	cursor: not-allowed;
}

.sse-notes-panel-body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 1rem 1.5rem;
}

.sse-notes-panel-body > div {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.sse-notes-panel-body .mce-tinymce {
	width: round(nearest, 100%, 1px) !important;
}

.sse-notes-panel-body .mce-tinymce .mce-btn-group button:hover {
	background-color: initial;
}

.sse-notes-panel-body .mce-tinymce .mce-btn.mce-active button, .mce-btn.mce-active:hover button, .mce-btn.mce-active i, .mce-btn.mce-active:hover i {
	color: var(--ast-global-color-0, #5390d9) !important;
}

.sse-notes-edit-panel .sse-notes-textarea {
	width: 100%;
	height: calc(100% - 60px); /* 67 is the height of TinyMCE toolbar */
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	resize: vertical;
}

.sse-notes-edit-panel .sse-notes-textarea:focus {
	outline: none;
	border-color: var(--ast-global-color-0, #5390d9);
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* TinyMCE inside notes panel */
.sse-notes-edit-panel .mce-tinymce {
	flex: 1 1 auto;
	min-height: 0;
	margin-bottom: 0;
}

.sse-notes-edit-panel .sse-notes-save,
.sse-notes-edit-panel .sse-notes-cancel,
.sse-notes-edit-panel .sse-notes-delete,
.sse-notes-edit-panel .sse-notes-delete .dashicons,
.sse-notes-edit-panel .sse-notes-delete-confirm-yes,
.sse-notes-edit-panel .sse-notes-delete-confirm-cancel {
	transition: all 0.2s linear;
}

.sse-notes-edit-panel .sse-notes-save,
.sse-notes-edit-panel .sse-notes-cancel,
.sse-notes-edit-panel .sse-notes-delete-confirm-yes,
.sse-notes-edit-panel .sse-notes-delete-confirm-cancel {
	padding: 5px 1rem;
	font-size: 0.75rem;
	line-height: normal;
}

.sse-notes-edit-panel .sse-notes-delete-confirm-yes {
	background-color: var(--wp--preset--color--ast-global-color-1, #e44b43);
}

.sse-notes-edit-panel .sse-notes-delete-confirm-yes:hover {
	background-color: var(--ast-global-color-8);
}

.sse-notes-edit-panel .sse-notes-save:disabled,
.sse-notes-edit-panel .sse-notes-save:disabled:hover {
	opacity: 0.7;
	background-color: var(--ast-global-color-0, #5390d9);
	cursor: not-allowed;
}

/* Notes panel: media queries */
@media (min-width: 1201px) {
	body.sse-notes-panel-open #content {
		width: 60%;
		max-width: 60vw;
	}

	.sse-notes-edit-panel {
		left: 60%;
		left: round(nearest, 60vw, 1px);
		right: 0;
		width: auto;
	}
}

/* Respect WordPress admin bar when logged in. */
@media screen and (min-width: 601px) and (max-width: 782px) {
	.admin-bar .sse-notes-edit-panel {
		top: 46px;
		height: calc(100% - 46px);
	}
}

@media screen and (min-width: 783px) {
	.admin-bar .sse-notes-edit-panel {
		top: 32px;
		height: calc(100% - 32px);
	}
}

@media (max-width: 1200px) {
	body.sse-notes-panel-open {
		overflow: hidden;
	}

	.sse-notes-edit-panel {
		width: 100%;
	}

	.sse-notes-panel-footer {
		flex-direction: column;
		align-items: stretch;
	}

	.sse-notes-panel-actions,
	.sse-notes-delete-confirm {
		width: 100%;
	}

	.sse-notes-save,
	.sse-notes-cancel,
	.sse-notes-delete-confirm-yes,
	.sse-notes-delete-confirm-cancel {
		flex-grow: 1;
	}

	.sse-notes-panel-body {
		max-height: 70vh; /* 70vh is the height of the screen minus the Browser top bar on mobile */
	}

	.sse-notes-edit-panel .sse-notes-textarea {
		height: calc(100% - 67px); /* 67 is the height of TinyMCE toolbar, 50 is the height of the Browser top bar on mobile */
	}
}

@media (prefers-reduced-motion: reduce) {
	.sse-notes-edit-panel {
		transition: none;
	}
}

/* ==========================================================================
   Details Panel (Slide-in)
   ========================================================================== */

.sse-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 350px;
	max-width: 90vw;
	background: #ffffff;
	box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
	z-index: 9998;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
}

/* Respect WordPress admin bar */
.admin-bar .sse-panel {
	top: 32px;
}

/* WP admin bar is taller on mobile (46px vs 32px) */
@media screen and (max-width: 782px) {
	.admin-bar .sse-panel {
		top: 46px;
	}
}

.sse-panel.is-open {
	transform: translateX(0);
}

.sse-panel-header {
	position: sticky;
	top: 0;
	background: #ffffff;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #eee;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.sse-panel-title {
	flex: 1;
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
}

.sse-panel-item-id {
	font-size: 0.75rem;
	color: #999;
	width: 100%;
	order: 3;
}

.sse-panel-close {
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	cursor: pointer;
	color: #999;
	border-radius: 4px;
}

.sse-panel-close:hover {
	background: #f0f0f0;
	color: #333;
}

.sse-panel-body {
	padding: 1.5rem;
}

.sse-panel-section {
	margin-bottom: 1.5rem;
}

.sse-panel-section:last-child {
	margin-bottom: 0;
}

.sse-panel-section-title {
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
	margin: 0 0 0.75rem 0;
}

.sse-panel-reference {
	font-family: monospace;
	background: #f5f5f5;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	margin: 0;
}

.sse-panel-placeholder {
	color: #999;
	font-style: italic;
	font-size: 0.9rem;
}

/* ==========================================================================
   SSE Report Problem Modal
   ========================================================================== */

.sse-report-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.2s ease, opacity 0.2s ease;
}

.sse-report-modal.is-open {
	visibility: visible;
	opacity: 1;
}

.sse-report-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.sse-report-modal-content {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
}

.sse-report-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem;
	border-bottom: 1px solid #e0e0e0;
	flex-shrink: 0;
}

.sse-report-modal-title {
	font-size: 1rem;
}

.sse-report-modal-close {
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: #666;
	cursor: pointer;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sse-report-modal-close:hover {
	background: #f0f0f0;
	color: #333;
}

.sse-report-modal-body {
	padding: 1rem;
	flex: 1;
	min-height: 0;
}

.sse-report-modal-desc {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	line-height: 1.5;
}

.sse-report-modal-textarea {
	min-height: 100px;
	border-radius: 0.25rem;
	font-size: 0.9rem;
	line-height: 1.5;
	resize: vertical;
	box-sizing: border-box;
}

.sse-report-modal-textarea:focus {
	border-color: var(--ast-global-color-0, #5390d9);
}

.sse-report-modal-message {
	margin-top: 0.5rem;
	font-size: 0.8rem;
	line-height: 1.2;
}

.sse-report-modal-message-success {
	color: #28a745;
}

.sse-report-modal-message-error {
	color: var(--wp--preset--color--ast-global-color-1, #e44b43);
}

.sse-report-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	padding: 1rem 1.25rem;
	border-top: 1px solid #e0e0e0;
	flex-shrink: 0;
}

.sse-report-modal-cancel,
.sse-report-modal-submit {
	transition: all 0.2s linear;
	padding: 5px 1rem;
	font-size: 0.75rem;
	line-height: normal;
}

.sse-report-modal-submit:hover:not(:disabled) {
	opacity: 0.9;
}

.sse-report-modal-submit:disabled,
.sse-report-modal-submit:disabled:hover {
	opacity: 0.7;
	cursor: not-allowed;
	background: var(--ast-global-color-0, #5390d9);
}

/* ==========================================================================
   SSE Authentication Banner
   ========================================================================== */

.sse-auth-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: linear-gradient(135deg, var(--ast-global-color-0, #5390d9) 0%, var(--ast-global-color-8, #000000) 100%);
	color: #ffffff;
	padding: 1rem 2rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: transform 0.35s ease-in-out;
	transform: translateY(-100%);
}

.sse-auth-banner.is-visible {
	transform: translateY(0);
}

.admin-bar .sse-auth-banner {
	top: 32px;
}

.sse-auth-banner-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

.sse-auth-banner-message {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
}

.sse-auth-banner-icon {
	line-height: 1;
	flex-shrink: 0;
}

.sse-auth-banner-text {
	font-size: 0.95rem;
	line-height: 1.4;
}

.sse-auth-banner-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.sse-auth-banner-actions .ast-button,
.sse-auth-banner-actions .ast-outline-button {
	padding: 0.5rem 1rem;
	line-height: normal;
}

.sse-auth-banner-actions .ast-outline-button {
	border: 1px solid #ffffff;
	color: #ffffff;
}

.sse-auth-banner-actions .ast-outline-button:hover {
	background: #ffffff;
	color: var(--ast-global-color-8, #000000);
}

.sse-auth-banner-close {
	background: transparent;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 0.25rem;
	opacity: 0.7;
	transition: opacity 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

.sse-auth-banner-close:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.1);
}

.sse-auth-banner-close .dashicons {
	font-size: 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
}

/* SSE Authentication Banner - Responsive */
@media screen and (max-width: 782px) {
	.admin-bar .sse-auth-banner {
		top: 46px;
	}
}

@media (max-width: 768px) {
	.sse-auth-banner {
		padding: 1rem;
	}

	.sse-auth-banner-content {
		flex-direction: column;
		text-align: center;
		gap: 0.75rem;
	}

	.sse-auth-banner-message {
		flex-direction: column;
		gap: 0.5rem;
	}

	.sse-auth-banner-actions {
		flex-wrap: wrap;
		justify-content: center;
	}

	.sse-auth-banner-btn {
		padding: 0.5rem 1rem;
		font-size: 0.85rem;
	}

	.sse-auth-banner-close {
		display: none;
	}
}

/* ==========================================================================
   Astra Grid Layout Fix
   ========================================================================== */

/* Fix for "Above Footer" Astra grid row layout */
@media (min-width: 922px) {
	.ast-builder-grid-row-2-lheavy .ast-builder-grid-row {
		grid-template-columns: 6fr 1fr;
	}
}

/* ==========================================================================
   SSE Audio – item/interpretation players & playlist
   ========================================================================== */

.sse-item-header,
.sse-interpretation-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2rem;
	margin-bottom: 1rem;
}

.sse-item-audio-wrap,
.sse-interpretation-audio-wrap,
.sse-term-audio-wrap {
	position: relative;
	display: block;
	flex-grow: 1;
	max-width: 300px;
}

.sse-term-audio-wrap {
	margin-left: auto;
	margin-bottom: 1rem;
}

.sse-audio-load-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	cursor: pointer;
}

.sse-audio-play-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.sse-audio-play-trigger:hover {
	opacity: 0.85;
}

.sse-audio-play-trigger .dashicons {
	font-size: 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
}

.sse-item-audio,
.sse-interpretation-audio,
.sse-term-audio,
.sse-playlist-audio {
	display: block;
	height: 2.5rem;
	min-height: 40px;
	width: 100%;
}

/* Playlist block */
.sse-playlist.is-hidden-no-results {
	display: none;
}

.sse-playlist {
	margin-top: 1.5rem;
	padding: 2rem;
}

.sse-playlist-header {
	display: flex;
	align-items: center;
	gap: 1.25rem 2rem;
	margin-bottom: 1rem;
}

.sse-playlist-heading {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sse-playlist-icon {
	font-size: 1.5rem;
	width: 1.5rem;
	height: 1.5rem;
}

.sse-playlist-title {
	font-size: 1rem;
}

.sse-playlist-option {
	flex-shrink: 0;
}

.sse-playlist-play-interpretation-label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	font-size: 0.9rem;
}

.sse-playlist-audio-wrap {
	position: relative;
	display: block;
	flex-grow: 1;
	min-width: 0;
}

.sse-playlist-audio {
	height: 2.5rem;
	width: 100%;
}

.sse-playlist-tracks {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	overflow: hidden;
}

.sse-playlist-track {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	cursor: pointer;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	transition: background 0.15s ease;
}

.sse-playlist-track:last-child {
	border-bottom: none;
}

.sse-playlist-track:hover,
.sse-playlist-track:focus {
	background: rgba(0, 0, 0, 0.04);
	outline: none;
}

.sse-playlist-track.is-active {
	background-color: var(--ast-global-color-8, #000000);
	color: #ffffff;
	font-weight: 600;
}

.sse-playlist-track.is-hidden-by-filter {
	display: none;
}

.sse-playlist-track-icon {
	font-size: 1.5rem;
	width: 1.5rem;
	height: 1.5rem;
}

.sse-playlist-track.is-active .sse-playlist-track-icon {
	color: #ffffff;
}

.sse-playlist-track-label {
	flex: 1;
	font-size: 0.9rem;
}

/* Playlist header layout: when notes panel is open (any width) or viewport ≤1200px */
@media (max-width: 1600px) {
	body.sse-notes-panel-open .sse-playlist-header {
		flex-wrap: wrap;
	}

	body.sse-notes-panel-open .sse-playlist-heading {
		width: 100%;
	}

	body.sse-notes-panel-open .sse-playlist-option {
		order: 3;
	}
}

@media (max-width: 1200px) {
	.sse-playlist-header {
		flex-wrap: wrap;
	}

	.sse-playlist-heading {
		width: 100%;
	}

	.sse-playlist-option {
		order: 3;
	}
}

@media (max-width: 768px) {
	.sse-item-header,
	.sse-interpretation-header,
	.sse-playlist-header {
		flex-direction: column;
		align-items: initial;
	}

	.sse-item-audio-wrap,
	.sse-interpretation-audio-wrap,
	.sse-term-audio-wrap {
		max-width: initial;
	}

	.sse-item-audio-wrap {
		order: -1;
	}

	.sse-playlist {
		padding: 1rem;
	}
}

/* ==========================================================================
UM Resend Activation Form Styles
========================================================================== */

.um-raf-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 450px;
	margin: 0 auto;
}
