/**
 * Ledarportal Frontend Manager - Styles
 *
 * WCAG 2.1 AA Compliant Styles
 * Minimal styling to integrate with theme
 *
 * @package LedarportalFrontend
 */

/* ==========================================================================
   CSS Variables - Override with theme colors if needed
   ========================================================================== */
:root {
	--ledarportal-primary: var(--ast-global-color-0, #29A166);
	--ledarportal-secondary: #6EC4CC;
	--ledarportal-danger: #ED7354;
	--ledarportal-warning: #F7C433;
	--ledarportal-text: #333;
	--ledarportal-text-light: #666;
	--ledarportal-border: #ddd;
	--ledarportal-bg: #fff;
	--ledarportal-bg-light: #eeeeee;
	--ledarportal-shadow: rgba(0, 0, 0, 0.1);
	--ledarportal-focus: #ED82A3;
	--ledarportal-spacing: 1rem;
	--ledarportal-radius: 4px;
	--ledarportal-transition: 0.2s ease;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.required {
	color: var(--ledarportal-danger);
	font-weight: 700;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.ledarportal-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: var(--ledarportal-radius);
	transition: all var(--ledarportal-transition);
	background: transparent;
}

.ledarportal-btn:hover,
.ledarportal-btn:focus {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px var(--ledarportal-shadow);
}

/* Focus styles for accessibility (WCAG 2.1 AA) */
.ledarportal-btn:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: 2px;
}

.ledarportal-btn:active {
	transform: translateY(0);
}

.ledarportal-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

/* Button variants */
.ledarportal-btn-primary {
	color: #fff;
	background-color: var(--ledarportal-primary);
	border-color: var(--ledarportal-primary);
}

.ledarportal-btn-primary:hover,
.ledarportal-btn-primary:focus {
	background-color: #238a56;
	color: #fff;
}

.ledarportal-btn-secondary {
	color: #fff;
	background-color: var(--ledarportal-secondary);
	border-color: var(--ledarportal-secondary);
}

.ledarportal-btn-secondary:hover,
.ledarportal-btn-secondary:focus {
	background-color: #5aabb3;
}

.ledarportal-btn-danger {
	color: #fff;
	background-color: var(--ledarportal-danger);
	border-color: var(--ledarportal-danger);
}

.ledarportal-btn-danger:hover,
.ledarportal-btn-danger:focus {
	background-color: #d55d3e;
}

.ledarportal-btn-small {
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
}

/* Button loading state */
.ledarportal-btn.loading {
	position: relative;
	pointer-events: none;
	opacity: 0.8;
	cursor: not-allowed !important;
}

.ledarportal-btn.loading .ledarportal-btn-text {
	visibility: hidden;
}

.ledarportal-btn.loading::after {
	content: 'Sparar...';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-weight: 600;
}

.ledarportal-spinner {
	display: none;
	position: absolute;
	top: 50%;
	left: 1rem;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ledarportal-spin 0.6s linear infinite;
}

.ledarportal-btn.loading .ledarportal-spinner {
	display: block;
}

@keyframes ledarportal-spin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	.ledarportal-btn,
	.ledarportal-spinner {
		transition: none;
		animation: none;
	}
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.ledarportal-dashboard {
	max-width: 1200px;
	margin: 0 auto;
	padding: var(--ledarportal-spacing);
}

/* Dashboard Welcome Section */
.ledarportal-dashboard-welcome {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 3rem;
	padding: 2rem;
	background: var(--ledarportal-primary);
	border-radius: var(--ledarportal-radius);
	color: #fff;
}

.ledarportal-dashboard-title {
	margin: 0 0 0.5rem 0;
	font-size: 2.5rem;
	font-weight: 700;
	color: #fff;
}

.ledarportal-dashboard-subtitle {
	margin: 0;
	font-size: 1.1rem;
	opacity: 0.9;
}

.ledarportal-dashboard-avatar {
	flex-shrink: 0;
}

.ledarportal-dashboard-avatar img {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	border: 4px solid rgba(255, 255, 255, 0.3);
}

/* Stats Grid */
.ledarportal-dashboard-stats {
	margin-bottom: 3rem;
}

.ledarportal-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

.ledarportal-stat-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ledarportal-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ledarportal-stat-card-highlight {
	background: var(--ledarportal-primary);
	color: #fff;
}

.ledarportal-stat-card-highlight .ledarportal-stat-value,
.ledarportal-stat-card-highlight .ledarportal-stat-label {
	color: #fff;
}

.ledarportal-stat-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--ledarportal-bg-light);
	border-radius: 50%;
}

.ledarportal-stat-card-highlight .ledarportal-stat-icon {
	background: rgba(255, 255, 255, 0.2);
}

.ledarportal-stat-icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--ledarportal-primary);
}

.ledarportal-stat-card-highlight .ledarportal-stat-icon .dashicons {
	color: #fff;
}

.ledarportal-stat-content {
	flex: 1;
}

.ledarportal-stat-value {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 0.25rem;
	color: var(--ledarportal-text);
}

.ledarportal-stat-label {
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Quick Actions */
.ledarportal-dashboard-quick-actions {
	margin-bottom: 3rem;
}

.ledarportal-quick-actions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}

.ledarportal-quick-action-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	background: var(--ledarportal-primary);
	color: #fff;
	border-radius: var(--ledarportal-radius);
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ledarportal-quick-action-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	text-decoration: none;
	color: #fff;
}

.ledarportal-quick-action-card .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.ledarportal-quick-action-label {
	font-weight: 600;
	font-size: 1rem;
}

/* Quick Links */
.ledarportal-dashboard-quick-links {
	margin-bottom: 3rem;
}

.ledarportal-quick-links-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}

.ledarportal-quick-link-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	text-decoration: none;
	transition: all 0.2s ease;
}

.ledarportal-quick-link-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: var(--ledarportal-primary);
	text-decoration: none;
}

.ledarportal-quick-link-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: var(--ledarportal-bg-light);
	border-radius: 50%;
}

.ledarportal-quick-link-icon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: var(--ledarportal-primary);
}

.ledarportal-quick-link-content {
	flex: 1;
}

.ledarportal-quick-link-title {
	margin: 0 0 0.25rem 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

.ledarportal-quick-link-count {
	margin: 0;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-quick-link-card > .dashicons {
	flex-shrink: 0;
	color: var(--ledarportal-text-light);
	transition: transform 0.2s ease;
}

.ledarportal-quick-link-card:hover > .dashicons {
	transform: translateX(4px);
	color: var(--ledarportal-primary);
}

/* Recent Activity */
.ledarportal-dashboard-recent-activity {
	margin-bottom: 3rem;
}

.ledarportal-activity-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ledarportal-activity-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem;
	background: #fff;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	transition: background-color 0.2s ease;
}

.ledarportal-activity-item:hover {
	background-color: var(--ledarportal-bg-light);
}

.ledarportal-activity-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--ledarportal-bg-light);
	border-radius: 50%;
}

.ledarportal-activity-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: var(--ledarportal-primary);
}

.ledarportal-activity-content {
	flex: 1;
	min-width: 0;
}

.ledarportal-activity-title {
	margin: 0 0 0.25rem 0;
	font-size: 1rem;
	font-weight: 600;
}

.ledarportal-activity-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
}

.ledarportal-activity-title a:hover {
	color: var(--ledarportal-primary);
	text-decoration: underline;
}

.ledarportal-activity-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-activity-separator {
	opacity: 0.5;
}

.ledarportal-activity-actions {
	flex-shrink: 0;
}

/* Empty State */
.ledarportal-dashboard-empty {
	margin-bottom: 3rem;
}

.ledarportal-empty-state {
	text-align: center;
	padding: 3rem 2rem;
	background: var(--ledarportal-bg-light);
	border-radius: var(--ledarportal-radius);
}

.ledarportal-empty-state .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: var(--ledarportal-text-light);
	opacity: 0.5;
	margin-bottom: 1rem;
}

.ledarportal-empty-state p {
	font-size: 1.125rem;
	color: var(--ledarportal-text-light);
	margin-bottom: 2rem;
}

.ledarportal-empty-actions {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* Screen reader only */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
	.ledarportal-dashboard-welcome {
		flex-direction: column;
		text-align: center;
		gap: 1.5rem;
	}

	.ledarportal-dashboard-title {
		font-size: 2rem;
	}

	.ledarportal-stats-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	}

	.ledarportal-quick-actions-grid,
	.ledarportal-quick-links-grid {
		grid-template-columns: 1fr;
	}
}

/* Cards Grid */
.ledarportal-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.ledarportal-card {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	box-shadow: 0 2px 4px var(--ledarportal-shadow);
	transition: transform var(--ledarportal-transition);
}

.ledarportal-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
}

.ledarportal-card-icon {
	margin-bottom: 1rem;
	font-size: 2.5rem;
	color: var(--ledarportal-primary);
}

.ledarportal-card-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

.ledarportal-card-count {
	margin: 0 0 1.5rem;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-card-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: auto;
}

/* Recent Posts */
.ledarportal-recent-section {
	margin-bottom: 3rem;
}

.ledarportal-section-title {
	margin: 0 0 1.5rem;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--ledarportal-text);
	border-bottom: 2px solid var(--ledarportal-primary);
	padding-bottom: 0.5rem;
}

.ledarportal-posts-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ledarportal-post-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	transition: background-color var(--ledarportal-transition);
}

.ledarportal-post-item:hover {
	background-color: var(--ledarportal-bg-light);
}

.ledarportal-post-item.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

.ledarportal-post-content {
	flex: 1;
	min-width: 0;
}

.ledarportal-post-title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
}

.ledarportal-post-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
}

.ledarportal-post-title a:hover,
.ledarportal-post-title a:focus {
	color: var(--ledarportal-primary);
	text-decoration: underline;
}

.ledarportal-post-meta {
	margin: 0;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-post-actions {
	display: flex;
	gap: 0.5rem;
	flex-shrink: 0;
}

/* ÖFF Badge */
.ledarportal-off-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #856404;
	background-color: var(--ledarportal-warning);
	border-radius: var(--ledarportal-radius);
}

/* ==========================================================================
   Admin Navigation Menu
   ========================================================================== */
.ledarportal-admin-nav {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	border-bottom: 1px solid var(--ledarportal-border);
	box-shadow: 0 2px 4px var(--ledarportal-shadow);
}

/* Hide admin nav when Beaver Builder or other page builders are active */
.fl-builder-edit .ledarportal-admin-nav,
.elementor-editor-active .ledarportal-admin-nav {
	display: none !important;
}

/* Ensure Beaver Builder elements are always above our admin nav */
.fl-builder-bar,
.fl-builder-panel,
.fl-builder-ui-mask,
.fl-builder-lightbox {
	z-index: 100000 !important;
}

/* Adjust body padding when nav is present */
body.logged-in .ledarportal-admin-nav ~ * {
	padding-top: 0;
}

/* Nav Container */
.ledarportal-nav-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1rem;
	height: 64px;
}

/* Brand/Logo */
.ledarportal-nav-brand {
	flex-shrink: 0;
}

.ledarportal-nav-logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ledarportal-primary);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
}

.ledarportal-nav-logo:hover,
.ledarportal-nav-logo:focus {
	color: #238a56;
	outline: none;
}

.ledarportal-nav-logo:focus {
	outline: 2px solid var(--ledarportal-focus);
	outline-offset: 2px;
	border-radius: var(--ledarportal-radius);
}

.ledarportal-nav-logo .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
}

.ledarportal-nav-logo-text {
	font-size: 1.125rem;
}

/* Mobile Toggle Button */
.ledarportal-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: all var(--ledarportal-transition);
}

.ledarportal-nav-toggle:focus {
	outline: 2px solid var(--ledarportal-focus);
	outline-offset: 2px;
	border-radius: var(--ledarportal-radius);
}

.ledarportal-nav-toggle-icon {
	position: relative;
	width: 24px;
	height: 18px;
}

.ledarportal-nav-toggle-icon span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--ledarportal-text);
	transition: all 0.3s ease;
}

.ledarportal-nav-toggle-icon span:nth-child(1) {
	top: 0;
}

.ledarportal-nav-toggle-icon span:nth-child(2) {
	top: 50%;
	transform: translateY(-50%);
}

.ledarportal-nav-toggle-icon span:nth-child(3) {
	bottom: 0;
}

/* Toggle animation when menu is open */
.ledarportal-nav-toggle[aria-expanded="true"] .ledarportal-nav-toggle-icon span:nth-child(1) {
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
}

.ledarportal-nav-toggle[aria-expanded="true"] .ledarportal-nav-toggle-icon span:nth-child(2) {
	opacity: 0;
}

.ledarportal-nav-toggle[aria-expanded="true"] .ledarportal-nav-toggle-icon span:nth-child(3) {
	bottom: 50%;
	transform: translateY(50%) rotate(-45deg);
}

/* Nav Menu Container */
.ledarportal-nav-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	flex: 1;
	padding-left: 2rem;
}

/* Nav List */
.ledarportal-nav-list {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 1;
}

.ledarportal-nav-item {
	margin: 0;
	padding: 0;
}

/* Nav Links */
.ledarportal-nav-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--ledarportal-text);
	text-decoration: none;
	border-radius: var(--ledarportal-radius);
	transition: all var(--ledarportal-transition);
	white-space: nowrap;
}

.ledarportal-nav-link:hover,
.ledarportal-nav-link:focus {
	color: var(--ledarportal-primary);
	background-color: rgba(41, 161, 102, 0.1);
	outline: none;
}

.ledarportal-nav-link:focus {
	outline: 2px solid var(--ledarportal-focus);
	outline-offset: 2px;
}

.ledarportal-nav-link.active {
	color: var(--ledarportal-primary);
	background-color: rgba(41, 161, 102, 0.15);
	font-weight: 600;
}

.ledarportal-nav-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* User Menu */
.ledarportal-nav-user {
	position: relative;
	margin-left: auto;
}

.ledarportal-nav-user-toggle {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem;
	background: transparent;
	border: none;
	border-radius: var(--ledarportal-radius);
	cursor: pointer;
	transition: all var(--ledarportal-transition);
}

.ledarportal-nav-user-toggle:hover,
.ledarportal-nav-user-toggle:focus {
	background-color: rgba(41, 161, 102, 0.1);
	outline: none;
}

.ledarportal-nav-user-toggle:focus {
	outline: 2px solid var(--ledarportal-focus);
	outline-offset: 2px;
}

.ledarportal-nav-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.ledarportal-nav-user-name {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--ledarportal-text);
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ledarportal-nav-user-toggle .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--ledarportal-text-light);
	transition: transform var(--ledarportal-transition);
}

.ledarportal-nav-user-toggle[aria-expanded="true"] .dashicons {
	transform: rotate(180deg);
}

/* User Dropdown Menu */
.ledarportal-nav-user-menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	min-width: 240px;
	background: #fff;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all var(--ledarportal-transition);
	z-index: 1001;
}

.ledarportal-nav-user-menu[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ledarportal-nav-user-info {
	padding: 1rem;
	border-bottom: 1px solid var(--ledarportal-border);
}

.ledarportal-nav-user-info-name {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ledarportal-text);
	margin-bottom: 0.25rem;
}

.ledarportal-nav-user-info-email {
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	word-break: break-word;
}

.ledarportal-nav-user-menu-list {
	margin: 0;
	padding: 0.5rem 0;
	list-style: none;
}

.ledarportal-nav-user-menu-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	color: var(--ledarportal-text);
	text-decoration: none;
	transition: all var(--ledarportal-transition);
}

.ledarportal-nav-user-menu-link:hover,
.ledarportal-nav-user-menu-link:focus {
	background-color: var(--ledarportal-bg-light);
	color: var(--ledarportal-primary);
	outline: none;
}

.ledarportal-nav-user-menu-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
	.ledarportal-nav-link-text {
		display: none;
	}

	.ledarportal-nav-list {
		gap: 0.25rem;
	}

	.ledarportal-nav-link {
		padding: 0.625rem;
		justify-content: center;
	}
}

@media (max-width: 768px) {
	.ledarportal-nav-toggle {
		display: flex;
	}

	.ledarportal-nav-menu {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 1rem;
		background: #fff;
		border-top: 1px solid var(--ledarportal-border);
		box-shadow: 0 4px 8px var(--ledarportal-shadow);
		max-height: calc(100vh - 64px);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-10px);
		transition: all 0.3s ease;
	}

	.ledarportal-nav-toggle[aria-expanded="true"] ~ .ledarportal-nav-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.ledarportal-nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		width: 100%;
		margin-bottom: 1rem;
		padding-bottom: 1rem;
		border-bottom: 1px solid var(--ledarportal-border);
	}

	.ledarportal-nav-link {
		justify-content: flex-start;
		padding: 1rem;
	}

	.ledarportal-nav-link-text {
		display: inline;
	}

	.ledarportal-nav-user {
		width: 100%;
		margin-left: 0;
	}

	.ledarportal-nav-user-toggle {
		width: 100%;
		justify-content: flex-start;
		padding: 1rem;
	}

	.ledarportal-nav-user-menu {
		position: static;
		margin-top: 0.5rem;
		box-shadow: none;
		border: 1px solid var(--ledarportal-border);
		transform: none;
	}

	.ledarportal-nav-user-menu[aria-hidden="false"] {
		transform: none;
	}
}

/* Accessibility: Skip to content link */
.ledarportal-skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	z-index: 10000;
	padding: 0.75rem 1rem;
	background: var(--ledarportal-primary);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	border-radius: 0 0 var(--ledarportal-radius) 0;
}

.ledarportal-skip-link:focus {
	top: 0;
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	.ledarportal-nav-toggle-icon span,
	.ledarportal-nav-link,
	.ledarportal-nav-user-toggle,
	.ledarportal-nav-user-menu,
	.ledarportal-nav-menu {
		transition: none;
	}
}
/* ==========================================================================
   Frontend Action Buttons
   ========================================================================== */
.ledarportal-add-new-container {
	margin-bottom: 2rem;
}

.ledarportal-action-buttons {
	display: inline-flex;
	gap: 0.5rem;
	margin: 0.5rem 0;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.ledarportal-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.ledarportal-modal[aria-hidden="false"] {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.ledarportal-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.ledarportal-modal-container {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--ledarportal-bg);
	border-radius: var(--ledarportal-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	z-index: 10000;
}

.ledarportal-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem;
	border-bottom: 1px solid var(--ledarportal-border);
	position: sticky;
	top: 0;
	background: var(--ledarportal-bg);
	z-index: 1;
}

.ledarportal-modal-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

.ledarportal-modal-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	font-size: 1.5rem;
	color: var(--ledarportal-text-light);
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: all var(--ledarportal-transition);
}

.ledarportal-modal-close:hover,
.ledarportal-modal-close:focus {
	color: var(--ledarportal-text);
	background-color: var(--ledarportal-bg-light);
}

.ledarportal-modal-close:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: 2px;
}

.ledarportal-modal-body {
	padding: 1.5rem;
}

.ledarportal-modal-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 1.5rem;
	border-top: 1px solid var(--ledarportal-border);
	position: sticky;
	bottom: 0;
	background: var(--ledarportal-bg);
}

/* Large modal variant */
.ledarportal-modal-xl {
	max-width: 1000px;
}

/* Tabs */
.ledarportal-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--ledarportal-border);
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.ledarportal-tab {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ledarportal-text-light);
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	transition: all var(--ledarportal-transition);
	white-space: nowrap;
}

.ledarportal-tab:hover {
	color: var(--ledarportal-text);
	background-color: var(--ledarportal-bg-light);
}

.ledarportal-tab:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: -3px;
}

.ledarportal-tab.active {
	color: var(--ledarportal-primary);
	border-bottom-color: var(--ledarportal-primary);
}

.ledarportal-tab .dashicons {
	font-size: 1.125rem;
}

/* Tab panels */
.ledarportal-tab-panel {
	display: none;
}

.ledarportal-tab-panel.active {
	display: block;
}

.ledarportal-tab-panel[aria-hidden="false"] {
	display: block;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.ledarportal-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ledarportal-form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}

.ledarportal-form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ledarportal-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

.ledarportal-input,
.ledarportal-textarea,
.ledarportal-select {
	width: 100%;
	padding: 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.5;
	color: var(--ledarportal-text);
	background-color: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	transition: border-color var(--ledarportal-transition);
}

.ledarportal-input:hover,
.ledarportal-textarea:hover,
.ledarportal-select:hover {
	border-color: var(--ledarportal-secondary);
}

.ledarportal-input:focus,
.ledarportal-textarea:focus,
.ledarportal-select:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: 0;
	border-color: var(--ledarportal-primary);
}

.ledarportal-input[aria-invalid="true"],
.ledarportal-textarea[aria-invalid="true"],
.ledarportal-select[aria-invalid="true"] {
	border-color: var(--ledarportal-danger);
}

.ledarportal-textarea {
	resize: vertical;
	min-height: 100px;
}

/* Text editor */
.ledarportal-text-editor {
	width: 100%;
}

.ledarportal-editor-toolbar {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 0.5rem;
	padding: 0.5rem;
	background-color: var(--ledarportal-bg-light);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
}

.ledarportal-editor-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background-color: transparent;
	border: 1px solid transparent;
	border-radius: var(--ledarportal-radius);
	cursor: pointer;
	transition: all 0.2s ease;
	color: var(--ledarportal-text);
}

.ledarportal-editor-btn:hover {
	background-color: var(--ledarportal-bg);
	border-color: var(--ledarportal-border);
}

.ledarportal-editor-btn:active,
.ledarportal-editor-btn.active {
	background-color: var(--ledarportal-primary);
	color: #fff;
}

.ledarportal-editor-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.ledarportal-editor-textarea {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.ledarportal-editor-content {
	width: 100%;
	min-height: 200px;
	padding: 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.5;
	color: var(--ledarportal-text);
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: var(--ledarportal-radius);
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	outline: none;
	overflow-y: auto;
	word-wrap: break-word;
	box-sizing: border-box;
}

.ledarportal-editor-content:hover {
	border-color: var(--ledarportal-secondary);
}

.ledarportal-editor-content:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: 0;
	border-color: var(--ledarportal-primary);
}

.ledarportal-editor-content[aria-invalid="true"] {
	border-color: var(--ledarportal-danger);
}

.ledarportal-editor-content:empty:before {
	content: attr(data-placeholder);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-editor-content strong {
	font-weight: 600;
}

.ledarportal-editor-content em {
	font-style: italic;
}

.ledarportal-editor-content a {
	color: var(--ledarportal-primary);
	text-decoration: underline;
}

.ledarportal-editor-content ul {
	margin: 0.5rem 0;
	padding-left: 1.5rem;
	list-style-type: disc;
}

.ledarportal-editor-content li {
	margin: 0.25rem 0;
}

/* Field help text */
.ledarportal-field-help {
	font-size: 0.75rem;
	color: var(--ledarportal-text-light);
}

/* Field errors (WCAG 2.1 AA - 4.5:1 contrast ratio) */
.ledarportal-field-error {
	display: none;
	font-size: 0.875rem;
	font-weight: 600;
	color: #c23030;
}

.ledarportal-field-error:not(:empty) {
	display: block;
}

/* Error summary */
.ledarportal-error-summary {
	display: none;
	padding: 1rem;
	margin-bottom: 1rem;
	background-color: #fef0f0;
	border: 2px solid var(--ledarportal-danger);
	border-radius: var(--ledarportal-radius);
	color: #c23030;
}

.ledarportal-error-summary[aria-hidden="false"] {
	display: block;
}

.ledarportal-error-summary ul {
	margin: 0.5rem 0 0;
	padding-left: 1.5rem;
}

/* File input */
.ledarportal-file-input {
	padding: 0.5rem;
}

.ledarportal-file-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ledarportal-file-preview {
	display: none;
	padding: 0.75rem;
	background-color: var(--ledarportal-bg-light);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	font-size: 0.875rem;
}

.ledarportal-file-preview:not(:empty) {
	display: block;
}

/* Progress bar */
.ledarportal-progress {
	position: relative;
	width: 100%;
	height: 2rem;
	background-color: var(--ledarportal-bg-light);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	overflow: hidden;
}

.ledarportal-progress-bar {
	height: 100%;
	background-color: var(--ledarportal-primary);
	transition: width 0.3s ease;
	width: 0;
}

.ledarportal-progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

/* Thumbnail uploader */
.ledarportal-thumbnail-wrapper {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.ledarportal-thumbnail-preview {
	display: none;
	width: 150px;
	height: 100px;
	object-fit: cover;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
}

.ledarportal-thumbnail-preview:not(:empty) {
	display: block;
}

/* ==========================================================================
   Status Messages
   ========================================================================== */
.ledarportal-status {
	position: fixed;
	top: 2rem;
	right: 2rem;
	z-index: 10001;
	max-width: 400px;
	padding: 1rem 1.5rem;
	font-size: 1rem;
	font-weight: 500;
	background: var(--ledarportal-bg);
	border-radius: var(--ledarportal-radius);
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
	transform: translateX(calc(100% + 2rem));
	transition: transform var(--ledarportal-transition);
}

.ledarportal-status.show {
	transform: translateX(0);
}

.ledarportal-status.success {
	border-left: 4px solid var(--ledarportal-primary);
}

.ledarportal-status.error {
	border-left: 4px solid var(--ledarportal-danger);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
	.ledarportal-cards-grid {
		grid-template-columns: 1fr;
	}

	.ledarportal-modal-container {
		max-width: 100%;
		max-height: 100vh;
		border-radius: 0;
	}

	.ledarportal-post-item {
		flex-direction: column;
		align-items: flex-start;
	}

	.ledarportal-post-actions {
		width: 100%;
		justify-content: flex-end;
	}

	.ledarportal-form-row {
		grid-template-columns: 1fr;
	}

	.ledarportal-status {
		right: 1rem;
		left: 1rem;
		max-width: none;
	}
}

/* ==========================================================================
   High Contrast Mode (Accessibility)
   ========================================================================== */
@media (prefers-contrast: high) {
	.ledarportal-btn,
	.ledarportal-input,
	.ledarportal-textarea,
	.ledarportal-select {
		border-width: 2px;
	}

	.ledarportal-modal-overlay {
		background-color: rgba(0, 0, 0, 0.9);
	}
}

/* ==========================================================================
   Shortcode Styles
   ========================================================================== */

/* Shortcode Header */
.ledarportal-shortcode-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.ledarportal-no-results {
	padding: 2rem;
	text-align: center;
	color: var(--ledarportal-text-light);
	background-color: var(--ledarportal-bg-light);
	border-radius: var(--ledarportal-radius);
}

.ledarportal-no-search-results {
	padding: 1.5rem;
	text-align: center;
	background-color: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: var(--ledarportal-radius);
	margin: 1rem 0;
}

.ledarportal-no-search-results p {
	margin: 0.5rem 0;
}

.ledarportal-no-search-results p:first-child {
	color: #856404;
	margin-bottom: 0.5rem;
}

.ledarportal-no-search-results p:last-child {
	color: #666;
	font-size: 0.9rem;
}

/* ==========================================================================
   Kalender Shortcode
   ========================================================================== */
.ledarportal-kalender {
	border: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

/* Kalender controls */
.ledarportal-kalender-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	flex: 1;
}

.ledarportal-kalender-search {
	position: relative;
	flex: 1;
	min-width: 250px;
	max-width: 400px;
}

.ledarportal-kalender-search .dashicons {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-kalender-filter {
	min-width: 200px;
}

.ledarportal-kalender-search-results {
	display: none;
	margin: 1rem 0;
	padding: 0.75rem;
	background-color: var(--ledarportal-bg-light);
	border-radius: var(--ledarportal-radius);
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-kalender-search-results:not(:empty) {
	display: block;
}

/* Month grouping */
.ledarportal-kalender-months {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.ledarportal-kalender-month-group {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ledarportal-kalender-month-group[style*="display: none"] {
	display: none !important;
}

.ledarportal-kalender-month-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--ledarportal-text);
	margin: 0;
	padding-bottom: 0.75rem;
	border-bottom: 3px solid var(--ledarportal-primary);
}

.ledarportal-kalender-list,
.ledarportal-kalender-list-view {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ledarportal-kalender-item {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	transition: box-shadow var(--ledarportal-transition);
}

.ledarportal-kalender-item:hover {
	box-shadow: 0 2px 8px var(--ledarportal-shadow);
}

.ledarportal-kalender-item.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

.ledarportal-kalender-date {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	background-color: var(--ledarportal-primary);
	color: #fff;
	border-radius: var(--ledarportal-radius);
	text-align: center;
}

.ledarportal-kalender-day {
	display: block;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
}

.ledarportal-kalender-month {
	display: block;
	font-size: 0.875rem;
	text-transform: uppercase;
	margin-top: 0.25rem;
}

.ledarportal-kalender-content {
	flex: 1;
	min-width: 0;
}

.ledarportal-kalender-title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 600;
}

.ledarportal-kalender-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
}

.ledarportal-kalender-title a:hover,
.ledarportal-kalender-title a:focus {
	color: var(--ledarportal-primary);
	text-decoration: underline;
}

.ledarportal-kalender-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-kalender-meta > span {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.ledarportal-kalender-types {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.ledarportal-event-type {
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: var(--ledarportal-secondary);
	color: #fff;
	border-radius: 12px;
}

.ledarportal-kalender-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex-shrink: 0;
}

/* ==========================================================================
   FAQ Shortcode
   ========================================================================== */
.ledarportal-faq-search {
	position: relative;
	flex: 1;
	max-width: 400px;
}

.ledarportal-faq-search .dashicons {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-faq-search-results {
	display: none;
	margin-top: 0.5rem;
	padding: 0.75rem;
	background-color: var(--ledarportal-bg-light);
	border-radius: var(--ledarportal-radius);
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-faq-search-results:not(:empty) {
	display: block;
}

.ledarportal-faq-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ledarportal-faq-item {
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
}

.ledarportal-faq-item.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

.ledarportal-faq-question {
	margin: 0;
}

/* Accordion styles */
.ledarportal-faq-accordion .ledarportal-faq-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 1.25rem 1.5rem;
	font-size: 1.125rem;
	font-weight: 600;
	text-align: left;
	color: var(--ledarportal-text);
	background: transparent;
	border: none;
	border-radius: var(--ledarportal-radius);
	cursor: pointer;
	transition: background-color var(--ledarportal-transition);
}

.ledarportal-faq-toggle:hover {
	background-color: var(--ledarportal-bg-light);
}

.ledarportal-faq-toggle:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: -3px;
}

.ledarportal-faq-toggle[aria-expanded="true"] .dashicons {
	transform: rotate(180deg);
}

.ledarportal-faq-icon {
	flex-shrink: 0;
	margin-left: 1rem;
	transition: transform var(--ledarportal-transition);
}

.ledarportal-faq-answer {
	padding: 0 1.5rem 1.5rem;
}

.ledarportal-faq-answer[hidden] {
	display: none;
}

.ledarportal-faq-answer-content {
	margin-bottom: 1rem;
	line-height: 1.6;
}

.ledarportal-faq-answer-content strong {
	font-weight: 600;
	color: var(--ledarportal-text);
}

.ledarportal-faq-answer-content em {
	font-style: italic;
}

.ledarportal-faq-answer-content a {
	color: var(--ledarportal-primary);
	text-decoration: underline;
	transition: color 0.2s ease;
}

.ledarportal-faq-answer-content a:hover {
	color: var(--ledarportal-secondary);
}

.ledarportal-faq-answer-content ul {
	margin: 0.5rem 0;
	padding-left: 1.5rem;
	list-style-type: disc;
}

.ledarportal-faq-answer-content li {
	margin: 0.25rem 0;
	line-height: 1.6;
}

.ledarportal-faq-categories {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.ledarportal-faq-category {
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: var(--ledarportal-bg-light);
	color: var(--ledarportal-text);
	border-radius: 12px;
}

.ledarportal-faq-actions {
	display: flex;
	gap: 0.5rem;
}

/* Non-accordion styles */
.ledarportal-faq-list:not(.ledarportal-faq-accordion) .ledarportal-faq-item {
	padding: 1.5rem;
}

.ledarportal-faq-list:not(.ledarportal-faq-accordion) .ledarportal-faq-question {
	margin-bottom: 1rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

/* ==========================================================================
   Dokument Shortcode
   ========================================================================== */

/* Dokument Controls (Search & Filter) */
.ledarportal-dokument-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	flex: 1;
}

.ledarportal-dokument-search {
	position: relative;
	flex: 1;
	min-width: 250px;
	max-width: 400px;
}

.ledarportal-dokument-search .dashicons {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-dokument-filter {
	min-width: 200px;
}

.ledarportal-dokument-search-results {
	display: none;
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background-color: var(--ledarportal-bg-light);
	border-left: 3px solid var(--ledarportal-primary);
	border-radius: var(--ledarportal-radius);
	color: var(--ledarportal-text);
	font-weight: 500;
}

/* Dokument Category Groups */
.ledarportal-dokument-categories {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.ledarportal-dokument-category-group {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ledarportal-dokument-category-group[style*="display: none"] {
	display: none !important;
}

.ledarportal-dokument-category-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--ledarportal-text);
	margin: 0;
	padding-bottom: 0.75rem;
	border-bottom: 3px solid var(--ledarportal-primary);
}

.ledarportal-dokument-grid .ledarportal-dokument-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.ledarportal-dokument-list .ledarportal-dokument-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ledarportal-dokument-item {
	display: flex;
	flex-direction: column;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	transition: box-shadow var(--ledarportal-transition);
}

.ledarportal-dokument-item:hover {
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
}

.ledarportal-dokument-item.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

.ledarportal-dokument-thumbnail {
	position: relative;
	width: 100%;
	height: 180px;
	background-color: var(--ledarportal-bg-light);
	overflow: hidden;
	border-radius: var(--ledarportal-radius) var(--ledarportal-radius) 0 0;
}

.ledarportal-dokument-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ledarportal-dokument-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 4rem;
	color: var(--ledarportal-primary);
}

.ledarportal-dokument-badge {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	background-color: var(--ledarportal-danger);
	border-radius: var(--ledarportal-radius);
}

.ledarportal-dokument-content {
	flex: 1;
	padding: 1.25rem;
}

.ledarportal-dokument-title {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ledarportal-text);
}

.ledarportal-dokument-categories {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.ledarportal-dokument-category {
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: var(--ledarportal-bg-light);
	color: var(--ledarportal-text);
	border-radius: 12px;
}

.ledarportal-dokument-meta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.75rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-dokument-filename {
	font-weight: 600;
}

.ledarportal-dokument-actions {
	display: flex;
	gap: 0.5rem;
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--ledarportal-border);
}

/* List layout */
.ledarportal-dokument-list .ledarportal-dokument-item {
	flex-direction: row;
}

.ledarportal-dokument-list .ledarportal-dokument-thumbnail {
	width: 150px;
	height: auto;
	flex-shrink: 0;
}

.ledarportal-dokument-list .ledarportal-dokument-actions {
	border-top: none;
	border-left: 1px solid var(--ledarportal-border);
	flex-direction: column;
	justify-content: center;
}

/* Document Cards (Grid Layout) */
.ledarportal-dokument-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.ledarportal-dokument-card {
	display: flex;
	flex-direction: column;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: 20px;
	transition: all var(--ledarportal-transition);
	position: relative;
	overflow: hidden;
}

.ledarportal-dokument-card:hover {
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
	transform: translateY(-2px);
}

.ledarportal-dokument-card.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

/* Document Card Image */
.ledarportal-dokument-card-image {
	position: relative;
	width: 100%;
	height: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #f5f5f5;
	overflow: hidden;
}

.ledarportal-dokument-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 1rem;
}

.ledarportal-dokument-card-no-image {
	background: linear-gradient(135deg, var(--ledarportal-primary) 0%, var(--ledarportal-primary-dark, #1f7d4e) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ledarportal-dokument-placeholder-icon {
	font-size: 4rem;
	color: rgba(255, 255, 255, 0.3);
}

.ledarportal-dokument-placeholder-icon .dashicons {
	width: 4rem;
	height: 4rem;
	font-size: 4rem;
}

/* Document Card Content */
.ledarportal-dokument-card-content {
	padding: 1rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ledarportal-dokument-card-title {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
}

.ledarportal-dokument-card-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
}

.ledarportal-dokument-card-title a:hover {
	color: var(--ledarportal-primary);
}

.ledarportal-dokument-card-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ledarportal-dokument-card-meta {
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	margin-top: auto;
}

.ledarportal-dokument-card-download {
	margin-top: 1rem;
}

.ledarportal-btn-download {
	width: 100%;
	justify-content: center;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #fff;
	text-decoration: none;
}

.ledarportal-btn-download:hover {
	background-color: #1e8a50;
	border-color: #1e8a50;
	color: #fff !important;
	transform: translateY(-1px);
}

.ledarportal-btn-download:focus {
	outline: 3px solid #1e8a50;
	outline-offset: 2px;
	background-color: #238a56;
	color: #fff !important;
}

.ledarportal-dokument-card-no-file {
	margin-top: 1rem;
	padding: 0.75rem;
	background-color: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #856404;
	font-size: 0.875rem;
}

.ledarportal-dokument-card-no-file .dashicons {
	flex-shrink: 0;
	color: #ffc107;
}

.ledarportal-dokument-card-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

/* ==========================================================================
   Wiki Shortcode
   ========================================================================== */

/* Wiki Controls (Search, Sort & Filter) */
.ledarportal-wiki-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	flex: 1;
}

.ledarportal-wiki-search {
	position: relative;
	flex: 1;
	min-width: 250px;
	max-width: 400px;
}

.ledarportal-wiki-search .dashicons {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-wiki-sort {
	min-width: 150px;
}

.ledarportal-wiki-filter {
	min-width: 200px;
}

.ledarportal-wiki-search-results {
	display: none;
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background-color: var(--ledarportal-bg-light);
	border-left: 3px solid var(--ledarportal-primary);
	border-radius: var(--ledarportal-radius);
	color: var(--ledarportal-text);
	font-weight: 500;
}

.ledarportal-wiki-search-results:not(:empty) {
	display: block;
}

/* Wiki Grid */
.ledarportal-wiki-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

/* Wiki Card (matching calendar card style) */
.ledarportal-wiki-card {
	display: flex;
	flex-direction: column;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: 20px;
	transition: all var(--ledarportal-transition);
	position: relative;
	overflow: hidden;
}

.ledarportal-wiki-card:hover {
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
	transform: translateY(-2px);
}

.ledarportal-wiki-card.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

/* Wiki Card Image */
.ledarportal-wiki-card-image {
	position: relative;
	width: 100%;
	height: 240px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.ledarportal-wiki-card-no-image {
	background: linear-gradient(135deg, var(--ledarportal-primary) 0%, var(--ledarportal-primary-dark, #1f7d4e) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ledarportal-wiki-placeholder-icon {
	font-size: 4rem;
	color: rgba(255, 255, 255, 0.3);
}

/* Source Logo (ÖFF or Club) */
.ledarportal-card-source-logo {
	position: absolute;
	top: 12px;
	right: 12px;
	max-width: 50px;
	max-height: 50px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.ledarportal-card-source-logo img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.ledarportal-wiki-placeholder-icon .dashicons {
	width: 4rem;
	height: 4rem;
	font-size: 4rem;
}

/* Wiki Card Content */
.ledarportal-wiki-card-content {
	flex: 1;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-wiki-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
}

.ledarportal-wiki-card-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	display: block;
}

.ledarportal-wiki-card-title a:hover,
.ledarportal-wiki-card-title a:focus {
	color: var(--ledarportal-primary);
}

.ledarportal-wiki-card-categories {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.ledarportal-wiki-category {
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: var(--ledarportal-primary);
	color: #fff;
	border-radius: 12px;
}

/* Wiki Card Actions */
.ledarportal-wiki-card-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--ledarportal-border);
}

/* Load More Button */
.ledarportal-load-more-container {
	display: flex;
	justify-content: center;
	margin: 2rem 0;
}

.ledarportal-load-more {
	min-width: 200px;
}

.ledarportal-load-more.loading {
	opacity: 0.7;
	pointer-events: none;
}

.ledarportal-load-more-spinner .dashicons {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.ledarportal-wiki-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.ledarportal-wiki-search,
	.ledarportal-wiki-sort,
	.ledarportal-wiki-filter {
		width: 100%;
		max-width: none;
		min-width: 0;
	}

	.ledarportal-wiki-grid {
		grid-template-columns: 1fr;
	}

	.ledarportal-wiki-card-image {
		height: 200px;
	}
}

/* ==========================================================================
   Nyheter Shortcode
   ========================================================================== */

/* Nyheter Controls (Search, Sort & Filter) */
.ledarportal-nyheter-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	flex: 1;
}

.ledarportal-nyheter-search {
	position: relative;
	flex: 1;
	min-width: 250px;
	max-width: 400px;
}

.ledarportal-nyheter-search .dashicons {
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-nyheter-sort {
	min-width: 150px;
}

.ledarportal-nyheter-filter {
	min-width: 200px;
}

.ledarportal-nyheter-search-results {
	display: none;
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background-color: var(--ledarportal-bg-light);
	border-left: 3px solid var(--ledarportal-primary);
	border-radius: var(--ledarportal-radius);
	color: var(--ledarportal-text);
	font-weight: 500;
}

/* Nyheter Grid */
.ledarportal-nyheter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

/* Nyheter Card */
.ledarportal-nyheter-card {
	display: flex;
	flex-direction: column;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: 20px;
	transition: all var(--ledarportal-transition);
	position: relative;
	overflow: hidden;
}

.ledarportal-nyheter-card:hover {
	box-shadow: 0 4px 12px var(--ledarportal-shadow);
	transform: translateY(-2px);
}

.ledarportal-nyheter-card.ledarportal-post-off {
	background-color: #f9f9f9;
	border-left: 4px solid #D10000;
}

/* Nyheter Card Image */
.ledarportal-nyheter-card-image {
	position: relative;
	width: 100%;
	height: 240px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.ledarportal-nyheter-card-no-image {
	background: linear-gradient(135deg, var(--ledarportal-primary) 0%, var(--ledarportal-primary-dark, #1f7d4e) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ledarportal-nyheter-placeholder-icon {
	font-size: 4rem;
	color: rgba(255, 255, 255, 0.3);
}

.ledarportal-nyheter-placeholder-icon .dashicons {
	width: 4rem;
	height: 4rem;
	font-size: 4rem;
}

/* Nyheter Card Content */
.ledarportal-nyheter-card-content {
	flex: 1;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-nyheter-card-date {
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	font-weight: 500;
}

.ledarportal-nyheter-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
}

.ledarportal-nyheter-card-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	display: block;
}

.ledarportal-nyheter-card-title a:hover,
.ledarportal-nyheter-card-title a:focus {
	color: var(--ledarportal-primary);
}

.ledarportal-nyheter-card-categories {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.ledarportal-nyheter-category {
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	background-color: var(--ledarportal-primary);
	color: #fff;
	border-radius: 12px;
}

/* Nyheter Card Actions */
.ledarportal-nyheter-card-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--ledarportal-border);
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.ledarportal-nyheter-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.ledarportal-nyheter-search,
	.ledarportal-nyheter-sort,
	.ledarportal-nyheter-filter {
		width: 100%;
		min-width: unset;
		max-width: none;
	}

	.ledarportal-nyheter-grid {
		grid-template-columns: 1fr;
	}

	.ledarportal-nyheter-card-image {
		height: 200px;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
	.ledarportal-btn,
	.ledarportal-action-buttons,
	.ledarportal-modal,
	.ledarportal-status {
		display: none !important;
	}
}

/* ==========================================================================
   Checkboxes and Term Management
   ========================================================================== */
.ledarportal-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.ledarportal-checkbox-label {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	background: var(--ledarportal-bg-light);
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
	cursor: pointer;
	transition: all var(--ledarportal-transition);
	user-select: none;
}

.ledarportal-checkbox-label:hover {
	background: #fff;
	border-color: var(--ledarportal-primary);
}

.ledarportal-checkbox-label:has(:checked) {
	background: var(--ledarportal-primary);
	color: #fff;
	border-color: var(--ledarportal-primary);
}

.ledarportal-checkbox {
	margin-right: 0.5rem;
	cursor: pointer;
}

/* Checkbox grid layout - compact multi-column display */
.ledarportal-checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.ledarportal-checkbox-grid .ledarportal-checkbox-label {
	width: 100%;
	margin: 0;
	padding: 0.625rem 0.875rem;
	font-size: 0.9375rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ledarportal-checkbox-grid .ledarportal-checkbox-label span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Responsive adjustments */
@media (min-width: 640px) {
	.ledarportal-checkbox-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 0.875rem;
	}
}

@media (min-width: 768px) {
	.ledarportal-checkbox-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1024px) {
	.ledarportal-checkbox-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.ledarportal-add-term {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ledarportal-border);
}

.ledarportal-label-small {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--ledarportal-text);
}

.ledarportal-input-group {
	display: flex;
	gap: 0.5rem;
}

.ledarportal-input-small {
	flex: 1;
	padding: 0.5rem;
	font-size: 0.875rem;
}

.ledarportal-btn-small {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	white-space: nowrap;
}

.ledarportal-add-term-btn {
	flex-shrink: 0;
	min-width: 100px;
	background-color: var(--ledarportal-primary);
	color: #fff;
	border-color: var(--ledarportal-primary);
}

.ledarportal-event-types-wrapper {
	background: var(--ledarportal-bg);
	padding: 1rem;
	border: 1px solid var(--ledarportal-border);
	border-radius: var(--ledarportal-radius);
}

/* ==========================================================================
   Calendar Card Layout
   ========================================================================== */
.ledarportal-kalender-card-view {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.ledarportal-kalender-card {
	background: #fff;
	border: none;
	border-radius: 20px;
	transition: all var(--ledarportal-transition);
	display: flex;
	flex-direction: column;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ledarportal-kalender-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ledarportal-kalender-card-image {
	position: relative;
	height: 200px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: var(--ledarportal-bg-light);
	border-radius: 20px 20px 0 0;
	overflow: hidden;
}

.ledarportal-kalender-card-no-image {
	background: linear-gradient(135deg, var(--ledarportal-primary) 0%, #2980b9 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ledarportal-kalender-card-date {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: rgba(255, 255, 255, 0.95);
	border-radius: var(--ledarportal-radius);
	padding: 0.5rem 0.65rem;
	text-align: center;
	min-width: 50px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ledarportal-kalender-card-day {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ledarportal-primary);
	line-height: 1;
}

.ledarportal-kalender-card-month {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ledarportal-text);
	text-transform: uppercase;
	margin-top: 0.2rem;
}

.ledarportal-kalender-card-content {
	padding: 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ledarportal-kalender-card-title {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 0.75rem 0;
	line-height: 1.3;
}

.ledarportal-kalender-card-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
}

.ledarportal-kalender-card-title a:hover {
	color: var(--ledarportal-primary);
}

.ledarportal-kalender-card-meta {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-kalender-card-meta .ledarportal-kalender-time,
.ledarportal-kalender-card-meta .ledarportal-kalender-location {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.ledarportal-kalender-card-meta .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.ledarportal-kalender-card-types {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: auto;
}

.ledarportal-kalender-card-types .ledarportal-event-type {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--ledarportal-bg-light);
	color: var(--ledarportal-primary);
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.ledarportal-kalender-card-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--ledarportal-border);
}

.ledarportal-kalender-card .ledarportal-off-badge {
	margin-top: 0.75rem;
}

.ledarportal-kalender-card-register {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--ledarportal-border);
}

.ledarportal-btn-register {
	width: 100%;
	justify-content: center;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ledarportal-btn-register .dashicons-external {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Responsive: 2 columns on tablets, 1 column on mobile */
@media (max-width: 768px) {
	.ledarportal-kalender-card-view {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 1rem;
	}
}

@media (max-width: 480px) {
	.ledarportal-kalender-card-view {
		grid-template-columns: 1fr;
	}

	.ledarportal-kalender-card-image {
		height: 160px;
	}
}

/* ==========================================================================
   Calendar View Modal
   ========================================================================== */
.ledarportal-modal-view .ledarportal-modal-container {
	max-width: 600px;
}

.ledarportal-event-view {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ledarportal-event-view-image {
	width: 100%;
	margin-bottom: 1rem;
}

.ledarportal-event-view-image img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.ledarportal-event-view-section {
	display: flex;
	gap: 1rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ledarportal-border);
}

.ledarportal-event-view-section:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.ledarportal-event-view-full {
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-event-view-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ledarportal-primary);
	color: #fff;
	border-radius: 50%;
}

.ledarportal-event-view-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.ledarportal-event-view-content {
	flex: 1;
}

.ledarportal-event-view-label {
	font-weight: 600;
	color: var(--ledarportal-text-light);
	font-size: 0.875rem;
	margin-bottom: 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ledarportal-event-view-value {
	font-size: 1rem;
	color: var(--ledarportal-text);
	line-height: 1.5;
}

.ledarportal-event-view-description {
	font-size: 1rem;
	color: var(--ledarportal-text);
	line-height: 1.6;
	white-space: pre-wrap;
}

.ledarportal-event-view-types {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ledarportal-event-view-types .ledarportal-event-type {
	display: inline-block;
	padding: 0.375rem 0.875rem;
	background: var(--ledarportal-bg-light);
	color: var(--ledarportal-primary);
	border-radius: 16px;
	font-size: 0.875rem;
	font-weight: 600;
}

.ledarportal-modal-footer .dashicons-external {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-left: 0.25rem;
	vertical-align: middle;
}

/* ========================================
   ÖVNINGSBANK STYLES
   ======================================== */

.ledarportal-ovningsbank {
	margin: 2rem 0;
}

.ledarportal-ovningsbank-controls {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: center;
}

.ledarportal-ovningsbank-search {
	position: relative;
	flex: 1;
	min-width: 250px;
}

.ledarportal-ovningsbank-search-input {
	width: 100%;
	padding-right: 2.5rem;
}

.ledarportal-ovningsbank-search .dashicons-search {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-ovningsbank-filter {
	min-width: 200px;
}

.ledarportal-ovningsbank-search-results {
	margin: 1rem 0;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

/* Övningsbank Grid */
.ledarportal-ovningsbank-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.ledarportal-ovningsbank-card {
	display: flex;
	flex-direction: column;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: 20px;
	transition: all var(--ledarportal-transition);
	overflow: hidden;
	position: relative;
}

.ledarportal-ovningsbank-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.ledarportal-ovningsbank-card.ledarportal-post-off {
	border-color: #D10000;
	border-width: 2px;
}

.ledarportal-ovningsbank-card-image {
	height: 240px;
	background-size: cover;
	background-position: center;
	background-color: var(--ledarportal-bg-light);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ledarportal-ovningsbank-card-no-image {
	background: linear-gradient(135deg, var(--ledarportal-bg-light) 0%, var(--ledarportal-bg) 100%);
}

.ledarportal-ovningsbank-placeholder-icon .dashicons {
	font-size: 80px;
	width: 80px;
	height: 80px;
	color: var(--ledarportal-text-light);
	opacity: 0.3;
}

.ledarportal-ovningsbank-card-content {
	padding: 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-ovningsbank-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
}

.ledarportal-ovningsbank-card-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
}

.ledarportal-ovningsbank-card-title a:hover {
	color: var(--ledarportal-primary);
}

.ledarportal-ovningsbank-card-taxonomies {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ledarportal-ovningsbank-category,
.ledarportal-ovningsbank-spelform {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--ledarportal-bg-light);
	color: var(--ledarportal-primary);
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.ledarportal-ovningsbank-spelform {
	background: #E8F5E9;
	color: #2E7D32;
}

.ledarportal-ovningsbank-card-actions {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border-top: 1px solid var(--ledarportal-border);
	background: var(--ledarportal-bg-light);
}

/* Övningsbank Loader */
.ledarportal-ovningsbank-loader,
.ledarportal-ovningsbank-end,
.ledarportal-traningspass-loader,
.ledarportal-traningspass-end {
	text-align: center;
	padding: 2rem 1rem;
	margin-top: 2rem;
}

.ledarportal-ovningsbank-loader p,
.ledarportal-ovningsbank-end p,
.ledarportal-traningspass-loader p,
.ledarportal-traningspass-end p {
	margin-top: 1rem;
	color: var(--ledarportal-text-light);
	font-size: 0.875rem;
}

.ledarportal-spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 4px solid var(--ledarportal-border);
	border-top-color: var(--ledarportal-primary);
	border-radius: 50%;
	animation: ledarportal-spin 0.8s linear infinite;
}

@keyframes ledarportal-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ========================================
   TRÄNINGSPASS STYLES
   ======================================== */

.ledarportal-traningspass {
	margin: 2rem 0;
}

.ledarportal-traningspass-controls {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: center;
}

.ledarportal-traningspass-search {
	position: relative;
	flex: 1;
	min-width: 250px;
}

.ledarportal-traningspass-search-input {
	width: 100%;
	padding-right: 2.5rem;
}

.ledarportal-traningspass-search .dashicons-search {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ledarportal-text-light);
	pointer-events: none;
}

.ledarportal-traningspass-filter {
	min-width: 200px;
}

.ledarportal-traningspass-search-results {
	margin: 1rem 0;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

/* Träningspass Grid */
.ledarportal-traningspass-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.ledarportal-traningspass-card {
	display: flex;
	flex-direction: column;
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: 20px;
	transition: all var(--ledarportal-transition);
	overflow: hidden;
	position: relative;
}

.ledarportal-traningspass-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.ledarportal-traningspass-card.ledarportal-post-off {
	border-color: #D10000;
	border-width: 2px;
}

.ledarportal-traningspass-card-image {
	height: 240px;
	background-size: cover;
	background-position: center;
	background-color: var(--ledarportal-bg-light);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ledarportal-traningspass-card-no-image {
	background: linear-gradient(135deg, var(--ledarportal-bg-light) 0%, var(--ledarportal-bg) 100%);
}

.ledarportal-traningspass-placeholder-icon .dashicons {
	font-size: 80px;
	width: 80px;
	height: 80px;
	color: var(--ledarportal-text-light);
	opacity: 0.3;
}

.ledarportal-traningspass-card-content {
	padding: 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-traningspass-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
}

.ledarportal-traningspass-card-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
}

.ledarportal-traningspass-card-title a:hover {
	color: var(--ledarportal-primary);
}

.ledarportal-traningspass-card-meta {
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
}

.ledarportal-traningspass-ovningar-count {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.ledarportal-traningspass-card-taxonomies {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ledarportal-traningspass-category,
.ledarportal-traningspass-spelform {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--ledarportal-bg-light);
	color: var(--ledarportal-primary);
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.ledarportal-traningspass-spelform {
	background: #E8F5E9;
	color: #2E7D32;
}

.ledarportal-traningspass-card-actions {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border-top: 1px solid var(--ledarportal-border);
	background: var(--ledarportal-bg-light);
}

/* ========================================
   SINGLE ÖVNING STYLES
   ======================================== */

.ledarportal-single-ovning,
.ledarportal-single-traningspass {
	max-width: 900px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.ledarportal-single-header {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 2px solid var(--ledarportal-border);
}

.ledarportal-single-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--ledarportal-text);
	margin: 0 0 1rem 0;
	line-height: 1.2;
}

.ledarportal-single-taxonomies {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1.5rem 0;
}

.ledarportal-single-taxonomy-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.ledarportal-single-taxonomy-group strong {
	color: var(--ledarportal-text-light);
	font-size: 0.875rem;
	font-weight: 600;
}

.ledarportal-taxonomy-tag {
	display: inline-block;
	padding: 0.375rem 0.875rem;
	background: var(--ledarportal-bg-light);
	color: var(--ledarportal-primary);
	border-radius: 16px;
	font-size: 0.875rem;
	font-weight: 600;
}

.ledarportal-single-source-logo {
	margin: 1rem 0;
}

.ledarportal-single-source-logo img {
	max-width: 100px;
	max-height: 100px;
	object-fit: contain;
}

.ledarportal-single-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.ledarportal-single-content {
	margin: 2rem 0;
}

.ledarportal-single-featured-image {
	margin-bottom: 2rem;
	border-radius: 20px;
	overflow: hidden;
}

.ledarportal-single-featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

.ledarportal-single-section {
	margin-bottom: 2.5rem;
}

.ledarportal-single-section h2 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--ledarportal-text);
	margin: 0 0 1rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ledarportal-primary);
}

.ledarportal-single-section-content {
	font-size: 1rem;
	line-height: 1.8;
	color: var(--ledarportal-text);
}

.ledarportal-single-section-content p {
	margin: 0 0 1rem 0;
}

.ledarportal-single-section-content ul,
.ledarportal-single-section-content ol {
	margin: 0 0 1rem 1.5rem;
}

.ledarportal-single-section-content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1rem 0;
}

.ledarportal-video-embed {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	border-radius: 12px;
}

.ledarportal-video-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	display: block !important; /* Override any theme/plugin hiding the iframe */
}

/* Force video embeds to show - override cookie consent and other blockers */
iframe[src*="youtube.com"],
iframe[src*="vimeo.com"] {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.iframe-cookieconsent {
	display: none !important;
}

.ledarportal-single-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--ledarportal-border);
}

/* Träningspass övningar list */
.ledarportal-traningspass-ovningar {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.ledarportal-traningspass-ovning-item {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0;
	background: var(--ledarportal-bg-light);
	border-radius: 20px;
	border: 1px solid var(--ledarportal-border);
	transition: all var(--ledarportal-transition);
	overflow: hidden;
}

.ledarportal-traningspass-ovning-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.ledarportal-traningspass-ovning-badge {
	position: absolute;
	top: 1.25rem;
	left: 1.25rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 1.25rem;
	background: var(--ledarportal-primary);
	color: white;
	border-radius: 100px;
	font-weight: 700;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
	z-index: 2;
}

/* When there's no label, just show the number as a circle */
.ledarportal-traningspass-ovning-badge:has(.ledarportal-traningspass-ovning-number:only-child) {
	padding: 0;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	justify-content: center;
}

.ledarportal-traningspass-ovning-badge:has(.ledarportal-traningspass-ovning-number:only-child) .ledarportal-traningspass-ovning-number {
	background: transparent;
	width: auto;
	height: auto;
	font-size: 1.625rem;
}

.ledarportal-traningspass-ovning-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	font-size: 1.25rem;
	font-weight: 700;
	flex-shrink: 0;
}

.ledarportal-traningspass-ovning-badge-label {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.ledarportal-traningspass-ovning-content {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.ledarportal-traningspass-ovning-thumbnail {
	position: relative;
	width: 100%;
	height: 400px;
	overflow: hidden;
}

.ledarportal-traningspass-ovning-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--ledarportal-transition);
}

.ledarportal-traningspass-ovning-thumbnail:hover img {
	transform: scale(1.05);
}

.ledarportal-traningspass-ovning-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
}

.ledarportal-traningspass-ovning-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.ledarportal-traningspass-ovning-meta {
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--ledarportal-border);
}

.ledarportal-traningspass-ovning-meta .tp-meta {
	margin: 0 0 0.5rem 0;
	font-size: 0.875rem;
	line-height: 1.6;
}

.ledarportal-traningspass-ovning-meta .tp-meta:last-child {
	margin-bottom: 0;
}

.tp-meta-in {
	margin: 1rem 0 0 0;
}

.tp-meta-in a {
	color: var(--ledarportal-primary);
	text-decoration: none;
	font-weight: 600;
	transition: color var(--ledarportal-transition);
}

.tp-meta-in a:hover {
	color: var(--ledarportal-secondary);
	text-decoration: underline;
}

.ledarportal-traningspass-ovning-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.ledarportal-traningspass-ovning-title a {
	color: var(--ledarportal-text);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
}

.ledarportal-traningspass-ovning-title a:hover {
	color: var(--ledarportal-primary);
}

.ledarportal-traningspass-ovning-excerpt {
	margin: 0;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.ledarportal-single-title {
		font-size: 2rem;
	}

	.ledarportal-traningspass-ovning-thumbnail {
		height: 280px;
	}

	.ledarportal-traningspass-ovning-details {
		padding: 1.25rem;
	}

	.ledarportal-traningspass-ovning-badge {
		top: 1rem;
		left: 1rem;
		padding: 0.5rem 1rem;
		gap: 0.625rem;
	}

	.ledarportal-traningspass-ovning-badge:has(.ledarportal-traningspass-ovning-number:only-child) {
		width: 48px;
		height: 48px;
	}

	.ledarportal-traningspass-ovning-badge:has(.ledarportal-traningspass-ovning-number:only-child) .ledarportal-traningspass-ovning-number {
		font-size: 1.375rem;
	}

	.ledarportal-traningspass-ovning-number {
		width: 32px;
		height: 32px;
		font-size: 1.125rem;
	}

	.ledarportal-traningspass-ovning-badge-label {
		font-size: 1rem;
	}
}

/* ========================================
   EDIT PAGE STYLES
   ======================================== */

.ledarportal-edit-page {
	margin: 0 0 2rem 0;
}

.ledarportal-edit-container {
	max-width: 900px;
	margin: 2rem auto 0 auto;
	padding: 0 1rem;
}

.ledarportal-edit-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid var(--ledarportal-border);
	flex-wrap: wrap;
	gap: 1rem;
}

.ledarportal-edit-title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--ledarportal-text);
	margin: 0;
}

.ledarportal-edit-form {
	background: var(--ledarportal-bg);
	border: 1px solid var(--ledarportal-border);
	border-radius: 20px;
	padding: 2rem;
}

.ledarportal-form-group {
	margin-bottom: 2rem;
}

.ledarportal-form-group:last-of-type {
	margin-bottom: 0;
}

.ledarportal-label {
	display: block;
	font-weight: 600;
	color: var(--ledarportal-text);
	margin-bottom: 0.5rem;
	font-size: 1rem;
}

.ledarportal-label .required {
	color: #D10000;
	margin-left: 0.25rem;
}

.ledarportal-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem;
	background: var(--ledarportal-bg-light);
	border-radius: 12px;
}

.ledarportal-checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: normal;
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 8px;
	transition: background var(--ledarportal-transition);
}

.ledarportal-checkbox-label:hover {
	background: rgba(0, 0, 0, 0.03);
}

.ledarportal-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

/* Image upload */
.ledarportal-image-upload {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ledarportal-image-preview {
	min-height: 200px;
	background: var(--ledarportal-bg-light);
	border: 2px dashed var(--ledarportal-border);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ledarportal-image-preview img {
	max-width: 100%;
	max-height: 400px;
	object-fit: contain;
}

.ledarportal-image-preview:empty::before {
	content: "Ingen bild vald";
	color: var(--ledarportal-text-light);
	font-style: italic;
}

.ledarportal-image-buttons {
	display: flex;
	gap: 0.75rem;
}

/* Övningar list for träningspass */
.ledarportal-ovningar-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1rem;
}

.ledarportal-ovning-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem;
	background: var(--ledarportal-bg-light);
	border: 1px solid var(--ledarportal-border);
	border-radius: 12px;
	transition: all var(--ledarportal-transition);
}

.ledarportal-ovning-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ledarportal-ovning-handle {
	cursor: move;
	color: var(--ledarportal-text-light);
	font-size: 20px;
	width: 20px;
	height: 20px;
	margin-top: 0.25rem;
}

.ledarportal-ovning-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-ovning-title-row {
	display: flex;
	align-items: center;
}

.ledarportal-ovning-title-row strong {
	font-weight: 600;
	color: var(--ledarportal-text);
	font-size: 1rem;
}

.ledarportal-ovning-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.ledarportal-ovning-fields .ledarportal-ovning-kommentar {
	grid-column: 1 / -1;
}

.ledarportal-ovning-rubrik,
.ledarportal-ovning-tid,
.ledarportal-ovning-kommentar {
	padding: 0.5rem;
	font-size: 0.875rem;
	border: 1px solid var(--ledarportal-border);
	border-radius: 6px;
	background: var(--ledarportal-bg);
}

.ledarportal-ovning-rubrik::placeholder,
.ledarportal-ovning-tid::placeholder,
.ledarportal-ovning-kommentar::placeholder {
	color: var(--ledarportal-text-light);
	opacity: 0.7;
}

.ledarportal-ovning-item .ledarportal-select {
	flex: 1;
}

.ledarportal-remove-ovning {
	flex-shrink: 0;
	align-self: flex-start;
	margin-top: 0.25rem;
}

.ledarportal-ovning-title {
	flex: 1;
	font-weight: 500;
	color: var(--ledarportal-text);
}

.ledarportal-ovning-placeholder {
	background: var(--ledarportal-bg);
	border: 2px dashed var(--ledarportal-primary);
	border-radius: 12px;
	height: 60px;
}

/* Övning Picker Modal */
#ledarportal-ovning-picker-modal {
	z-index: 10000; /* Higher than regular modals to show on top */
}

#ledarportal-ovning-picker-modal .ledarportal-modal-overlay {
	z-index: 10000;
}

#ledarportal-ovning-picker-modal .ledarportal-modal-container {
	z-index: 10001;
	max-width: 1200px;
	width: 95%;
}

.ledarportal-ovning-picker-search {
	margin-bottom: 0.75rem;
}

.ledarportal-ovning-picker-results-count {
	text-align: center;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	font-weight: 500;
}

.ledarportal-ovning-picker-filters {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: var(--ledarportal-bg-light);
	border-radius: 10px;
	border: 1px solid var(--ledarportal-border);
}

.ledarportal-filter-group {
	margin-bottom: 1rem;
}

.ledarportal-filter-group:last-child {
	margin-bottom: 0;
}

.ledarportal-filter-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ledarportal-text-light);
	margin-bottom: 0.5rem;
}

.ledarportal-filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ledarportal-filter-btn {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	border: 2px solid var(--ledarportal-border);
	background: var(--ledarportal-bg);
	color: var(--ledarportal-text);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.ledarportal-filter-btn:hover {
	border-color: var(--ledarportal-primary);
	background: rgba(41, 161, 102, 0.05);
	transform: translateY(-1px);
}

.ledarportal-filter-btn.active {
	background: var(--ledarportal-primary);
	border-color: var(--ledarportal-primary);
	color: white;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(41, 161, 102, 0.25);
}

.ledarportal-filter-btn.active:hover {
	background: #1F7A45;
	border-color: #1F7A45;
	transform: translateY(-1px);
}

.select-ovning-btn {
	width: 100%;
	margin-top: auto;
	font-weight: 600;
	padding: 0.625rem 1rem;
	transition: all 0.2s ease;
}

.ledarportal-ovning-picker-card:hover .select-ovning-btn {
	background: var(--ledarportal-primary);
	transform: scale(1.02);
}

.ledarportal-ovning-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.25rem;
	max-height: 600px;
	overflow-y: auto;
	padding: 0.5rem;
}

.ledarportal-ovning-picker-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem;
	background: var(--ledarportal-bg);
	border: 2px solid var(--ledarportal-border);
	border-radius: 12px;
	transition: all var(--ledarportal-transition);
	cursor: pointer;
}

.ledarportal-ovning-picker-card:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
	transform: translateY(-3px);
	border-color: var(--ledarportal-primary);
}

.ledarportal-ovning-picker-image {
	width: 100%;
	height: 180px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--ledarportal-bg-light);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ledarportal-ovning-picker-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ledarportal-ovning-picker-card:hover .ledarportal-ovning-picker-image img {
	transform: scale(1.05);
}

.ledarportal-ovning-picker-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--ledarportal-text-light);
	font-size: 56px;
	background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.ledarportal-ovning-picker-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ledarportal-ovning-picker-content h4 {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ledarportal-text);
	line-height: 1.4;
}

.ledarportal-ovning-picker-taxonomies {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ledarportal-ovning-picker-spelformer,
.ledarportal-ovning-picker-kategorier,
.ledarportal-ovning-picker-foreningar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	font-size: 0.875rem;
}

.ledarportal-ovning-picker-spelformer strong,
.ledarportal-ovning-picker-kategorier strong,
.ledarportal-ovning-picker-foreningar strong {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ledarportal-text-light);
	font-weight: 600;
}

.ledarportal-ovning-picker-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Spelform tags - blå/cyan */
.ledarportal-tag-spelform {
	padding: 0.375rem 0.875rem;
	font-size: 0.8125rem;
	font-weight: 500;
	background: #E6F7F9;
	color: #0891A5;
	border: 1px solid #B3E7ED;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.ledarportal-ovning-picker-card:hover .ledarportal-tag-spelform {
	background: #D1F2F6;
	border-color: #6EC4CC;
}

/* Kategori tags - grön */
.ledarportal-tag-kategori {
	padding: 0.375rem 0.875rem;
	font-size: 0.8125rem;
	font-weight: 500;
	background: #E8F5EE;
	color: #1F7A45;
	border: 1px solid #B8E6CB;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.ledarportal-ovning-picker-card:hover .ledarportal-tag-kategori {
	background: #D4EDDF;
	border-color: #29A166;
}

/* Förening tags - rosa/magenta */
.ledarportal-tag-forening {
	padding: 0.375rem 0.875rem;
	font-size: 0.8125rem;
	font-weight: 500;
	background: #FCE8F3;
	color: #BE185D;
	border: 1px solid #F9C9E0;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.ledarportal-ovning-picker-card:hover .ledarportal-tag-forening {
	background: #F9D5E8;
	border-color: #ED82A3;
}

.ledarportal-ovning-picker-card .ledarportal-tag {
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	background: var(--ledarportal-primary-light);
	color: var(--ledarportal-primary);
	border-radius: 6px;
}

/* Form actions */
.ledarportal-form-actions {
	display: flex;
	gap: 1rem;
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 2px solid var(--ledarportal-border);
}

/* WordPress editor in edit pages */
.ledarportal-edit-form .wp-editor-wrap {
	border: 1px solid var(--ledarportal-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.ledarportal-edit-form .wp-editor-container {
	border: none;
}

/* Hide quicktags toolbar completely */
.ledarportal-edit-form .quicktags-toolbar {
	display: none !important;
}

/* Toolbar styling */
.ledarportal-edit-form .mce-toolbar-grp {
	background: #f5f5f5;
	border-bottom: 1px solid var(--ledarportal-border);
	padding: 8px 10px;
}

.ledarportal-edit-form .mce-toolbar {
	padding: 0;
}

/* Add spacing between toolbar buttons */
.ledarportal-edit-form .mce-btn {
	margin: 0 2px !important;
}

.ledarportal-edit-form .mce-btn-group:not(:first-child) {
	margin-left: 6px;
}

/* Visual/Text tabs styling */
.ledarportal-edit-form .wp-editor-tabs {
	float: right;
	margin: 0;
	padding: 8px 8px 0;
	line-height: 1;
}

.ledarportal-edit-form .wp-switch-editor {
	background: #e5e5e5;
	border: 1px solid var(--ledarportal-border);
	border-bottom: 1px solid var(--ledarportal-border);
	color: #666;
	font-size: 13px;
	line-height: 1.4;
	padding: 8px 14px;
	margin-left: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
	border-radius: 6px 6px 0 0;
	position: relative;
	top: 1px;
}

.ledarportal-edit-form .wp-switch-editor:hover {
	background: #d5d5d5;
	color: #333;
}

.ledarportal-edit-form .switch-tmce.active,
.ledarportal-edit-form .switch-html.active {
	background: #f5f5f5;
	border-bottom-color: #f5f5f5;
	color: #333;
	font-weight: 500;
}

/* Media button styling */
.ledarportal-edit-form .wp-media-buttons {
	margin-bottom: 8px;
}

.ledarportal-edit-form .wp-media-buttons .button {
	background: var(--ledarportal-primary);
	border: none;
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ledarportal-edit-form .wp-media-buttons .button:hover {
	background: var(--ledarportal-primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
	.ledarportal-edit-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.ledarportal-edit-title {
		font-size: 1.5rem;
	}

	.ledarportal-edit-form {
		padding: 1.5rem;
	}

	.ledarportal-form-actions {
		flex-direction: column;
	}

	.ledarportal-form-actions .ledarportal-btn {
		width: 100%;
	}

	.ledarportal-ovning-item {
		flex-wrap: wrap;
	}

	.ledarportal-ovning-item .ledarportal-select {
		width: 100%;
		order: 2;
	}

	.ledarportal-remove-ovning {
		order: 3;
	}
}

/* ==========================================================================
   Login Page - Compact Modern Design
   ========================================================================== */
.ledarportal-login-container {
	min-height: 40vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--ledarportal-spacing);
}

.ledarportal-login-box {
	background: var(--ledarportal-bg);
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 2.5rem 2rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	width: 100%;
	max-width: 440px;
}

.ledarportal-login-header {
	text-align: center;
	margin-bottom: 1.5rem;
}

.ledarportal-login-header h2 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
	color: var(--ledarportal-text);
}

.ledarportal-login-subtitle {
	color: var(--ledarportal-text);
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
}

.ledarportal-login-messages {
	margin-bottom: 1rem;
}

.ledarportal-login-messages:empty {
	margin-bottom: 0;
}

.ledarportal-login-messages .ledarportal-message {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.ledarportal-login-messages .ledarportal-message-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626;
}

.ledarportal-login-messages .ledarportal-message-success {
	background-color: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #16a34a;
}

.ledarportal-login-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Override form-group margins for login form */
.ledarportal-login-form .ledarportal-form-group {
	margin-bottom: 0;
}

.ledarportal-login-form .ledarportal-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ledarportal-text);
	margin-bottom: 0.375rem;
}

/* Input with icon styling */
.ledarportal-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.ledarportal-input-icon {
	position: absolute;
	left: 1rem;
	color: var(--ledarportal-text-light);
	font-size: 1.25rem;
	pointer-events: none;
	z-index: 1;
}

.ledarportal-input-with-icon {
	padding-left: 3rem !important;
}

.ledarportal-login-form .ledarportal-input {
	font-size: 0.9375rem;
	padding: 0.625rem 1rem;
}

.ledarportal-login-form .ledarportal-input-with-icon {
	padding-left: 2.75rem !important;
}

.ledarportal-input-with-icon:focus + .ledarportal-input-icon,
.ledarportal-input-with-icon:focus ~ .ledarportal-input-icon {
	color: var(--ledarportal-primary);
}

/* Form row for checkbox and forgot password */
.ledarportal-form-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0;
	padding: 0;
	gap: 1rem;
}

.ledarportal-login-form .ledarportal-checkbox-group {
	margin: 0;
	padding: 0;
	background: none;
	border-radius: 0;
}

.ledarportal-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 400;
	color: var(--ledarportal-text);
	cursor: pointer;
	font-size: 0.875rem;
	position: relative;
	padding: 0;
	margin: 0;
	user-select: none;
}

.ledarportal-checkbox-label input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
}

.ledarportal-checkbox-custom {
	position: relative;
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid #d1d5db;
	border-radius: 4px;
	background: white;
	transition: all 0.2s ease;
	flex-shrink: 0;
	vertical-align: middle;
}

.ledarportal-checkbox-label:hover .ledarportal-checkbox-custom {
	border-color: var(--ledarportal-primary);
}

.ledarportal-checkbox-label input[type="checkbox"]:checked + .ledarportal-checkbox-custom {
	background: var(--ledarportal-primary);
	border-color: var(--ledarportal-primary);
}

.ledarportal-checkbox-label input[type="checkbox"]:checked + .ledarportal-checkbox-custom::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 4px;
	height: 9px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ledarportal-checkbox-label input[type="checkbox"]:focus + .ledarportal-checkbox-custom {
	outline: 2px solid var(--ledarportal-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(41, 161, 102, 0.1);
}

.ledarportal-login-link-inline {
	color: var(--ledarportal-primary);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
}

.ledarportal-login-link-inline:hover,
.ledarportal-login-link-inline:focus {
	color: #238a56;
	text-decoration: underline;
}

.ledarportal-login-footer {
	margin-top: 1rem;
	text-align: center;
	padding-top: 1rem;
	border-top: 1px solid var(--ledarportal-border);
}

.ledarportal-login-link {
	color: var(--ledarportal-primary);
	text-decoration: none;
	transition: color var(--ledarportal-transition);
	font-size: 0.875rem;
}

.ledarportal-login-link:hover,
.ledarportal-login-link:focus {
	color: #238a56;
	text-decoration: underline;
}

/* Login form actions override */
.ledarportal-login-form .ledarportal-form-actions {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

/* Login button styling */
.ledarportal-btn-login {
	margin-top: 0.25rem;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	font-size: 1rem;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.ledarportal-btn-login:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(41, 161, 102, 0.3);
}

.ledarportal-btn-login .ledarportal-btn-text {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.ledarportal-btn-login .dashicons {
	font-size: 1.125rem;
	width: 1.125rem;
	height: 1.125rem;
}

/* Loading state for login button */
.ledarportal-btn-loading {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.ledarportal-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ledarportal-spin 0.6s linear infinite;
}

@keyframes ledarportal-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Logged in message */
.ledarportal-login-box .ledarportal-login-content {
	text-align: center;
}

.ledarportal-login-box .ledarportal-login-content p {
	color: var(--ledarportal-text-light);
	margin-bottom: 1.5rem;
}

.ledarportal-login-box .ledarportal-login-content .ledarportal-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* Responsive design */
@media (max-width: 600px) {
	.ledarportal-login-box {
		padding: 1.5rem;
	}

	.ledarportal-login-header h2 {
		font-size: 1.25rem;
	}

	.ledarportal-login-subtitle {
		font-size: 0.9rem;
	}

	.ledarportal-form-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.ledarportal-checkbox-group {
		width: 100%;
	}

	.ledarportal-login-link-inline {
		width: 100%;
		text-align: left;
	}
}

/* ==========================================================================
   Settings Page
   ========================================================================== */

/* Dölj Astra-temats sidtitel på inställningssidan */
.page .entry-header:has(~ .ledarportal-settings-page),
.ledarportal-settings-page ~ .entry-header,
body:has(.ledarportal-settings-page) .entry-header {
	display: none;
}

.ledarportal-settings-page {
	max-width: 1100px;
	margin: 0 auto;
	padding: 2rem 1rem 4rem;
	min-height: 100vh;
}

.ledarportal-settings-container {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.ledarportal-settings-header {
	display: none;
}

.ledarportal-settings-form {
	padding: 2.5rem 2.5rem 0;
}

.ledarportal-settings-section {
	margin-bottom: 2.5rem;
	padding: 2rem;
	background: #eeeeee;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
}

.ledarportal-settings-section:hover {
	border-color: rgba(41, 161, 102, 0.2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ledarportal-settings-section-title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.75rem 0;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--ledarportal-primary);
}

.ledarportal-settings-section-title .dashicons {
	display: none;
}

.ledarportal-settings-actions {
	margin-top: 0;
	padding: 2rem 2.5rem;
	border-top: 1px solid var(--ledarportal-border);
	background: transparent;
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
	position: sticky;
	bottom: 0;
	z-index: 10;
}

.ledarportal-settings-actions .ledarportal-btn {
	min-width: 200px;
	padding: 1rem 2rem;
	font-size: 1.125rem;
	font-weight: 600;
	gap: 0.75rem;
	box-shadow: 0 2px 8px rgba(41, 161, 102, 0.2);
	transition: all 0.3s ease;
}

.ledarportal-settings-actions .ledarportal-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(41, 161, 102, 0.3);
}

.ledarportal-settings-actions .ledarportal-btn.loading {
	opacity: 0.7;
	pointer-events: none;
	position: relative;
}

.ledarportal-settings-actions .ledarportal-btn.loading::after {
	content: '';
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	border: 2px solid white;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to { transform: translateY(-50%) rotate(360deg); }
}

/* Logo upload - modernare design */
.ledarportal-image-upload {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.ledarportal-logo-preview {
	width: 100%;
	max-width: 280px;
	height: 280px;
	margin: 0;
	border: 3px dashed var(--ledarportal-border);
	border-radius: 12px;
	overflow: hidden;
	background: white;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	position: relative;
}

.ledarportal-logo-preview:hover {
	border-color: var(--ledarportal-secondary);
	background: rgba(41, 161, 102, 0.02);
}

.ledarportal-logo-preview img {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
	border-radius: 8px;
}

.ledarportal-logo-placeholder {
	text-align: center;
	color: var(--ledarportal-text-light);
	padding: 2rem;
}

.ledarportal-logo-placeholder .dashicons {
	font-size: 4rem;
	width: 4rem;
	height: 4rem;
	opacity: 0.3;
	margin-bottom: 1rem;
	color: var(--ledarportal-secondary);
}

.ledarportal-logo-placeholder p {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 500;
}

.ledarportal-image-buttons {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.ledarportal-image-buttons .ledarportal-btn {
	flex: 1;
	min-width: 160px;
	justify-content: center;
}

.ledarportal-field-description {
	margin: 0.5rem 0 0 0;
	font-size: 0.875rem;
	color: var(--ledarportal-text-light);
	line-height: 1.5;
}

.ledarportal-form-row {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 1.25rem;
}

/* Message styles - modernare */
.ledarportal-message {
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 1rem;
	font-weight: 500;
	font-size: 1rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ledarportal-message .dashicons {
	font-size: 1.75rem;
	width: 1.75rem;
	height: 1.75rem;
	flex-shrink: 0;
}

.ledarportal-message-success {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	color: #155724;
	border: 1px solid #a8d5b0;
}

.ledarportal-message-success .dashicons {
	color: #28a745;
}

.ledarportal-message-error {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	color: #721c24;
	border: 1px solid #e8a8af;
}

.ledarportal-message-error .dashicons {
	color: #dc3545;
}

/* Module Settings - card-baserad design */
/* Dold så länge */
.ledarportal-settings-section:has(.ledarportal-modules-list) {
	display: none;
}

/* Dölj besöksadress, postnummer och postort */
#kontakt-adress,
label[for="kontakt-adress"],
label[for="kontakt-postnummer"],
label[for="kontakt-postort"],
.ledarportal-form-group:has(#kontakt-adress),
.ledarportal-form-row:has(#kontakt-postnummer) {
	display: none;
}

/* Password Strength Indicator */
.ledarportal-password-strength {
	margin-top: 0.75rem;
	padding: 0.75rem;
	background: white;
	border-radius: 6px;
	border: 1px solid var(--ledarportal-border);
}

.ledarportal-password-strength-bar {
	width: 100%;
	height: 8px;
	background: #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.ledarportal-password-strength-fill {
	height: 100%;
	width: 0%;
	transition: all 0.3s ease;
	border-radius: 4px;
}

.ledarportal-password-strength-text {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
}

/* Password strength colors */
.ledarportal-password-strength[data-strength="weak"] .ledarportal-password-strength-fill {
	width: 33%;
	background: #dc3545;
}

.ledarportal-password-strength[data-strength="weak"] .ledarportal-password-strength-text {
	color: #dc3545;
}

.ledarportal-password-strength[data-strength="medium"] .ledarportal-password-strength-fill {
	width: 66%;
	background: #ffc107;
}

.ledarportal-password-strength[data-strength="medium"] .ledarportal-password-strength-text {
	color: #f57c00;
}

.ledarportal-password-strength[data-strength="strong"] .ledarportal-password-strength-fill {
	width: 100%;
	background: #28a745;
}

.ledarportal-password-strength[data-strength="strong"] .ledarportal-password-strength-text {
	color: #28a745;
}

.ledarportal-modules-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}

.ledarportal-module-item {
	padding: 0;
	background: white;
	border-radius: 10px;
	border: 2px solid var(--ledarportal-border);
	transition: all 0.3s ease;
	overflow: hidden;
}

.ledarportal-module-item:hover:not(:has(.ledarportal-checkbox-disabled)) {
	border-color: var(--ledarportal-secondary);
	box-shadow: 0 4px 12px rgba(41, 161, 102, 0.15);
	transform: translateY(-2px);
}

.ledarportal-module-item:has(.ledarportal-checkbox:checked) {
	border-color: var(--ledarportal-secondary);
	background: rgba(41, 161, 102, 0.03);
}

.ledarportal-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	cursor: pointer;
	user-select: none;
	padding: 1.5rem;
	width: 100%;
}

.ledarportal-checkbox-label.ledarportal-checkbox-disabled {
	cursor: default;
	opacity: 0.7;
}

.ledarportal-checkbox {
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	margin-top: 0.125rem;
	cursor: pointer;
	accent-color: var(--ledarportal-secondary);
}

.ledarportal-checkbox:disabled {
	cursor: not-allowed;
}

.ledarportal-checkbox:focus {
	outline: 3px solid var(--ledarportal-focus);
	outline-offset: 2px;
}

.ledarportal-checkbox-text {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

.ledarportal-checkbox-text strong {
	color: var(--ledarportal-text);
	font-weight: 600;
	font-size: 1.05rem;
}

.ledarportal-module-description {
	display: block;
	font-size: 0.9rem;
	color: var(--ledarportal-text-light);
	font-weight: normal;
	line-height: 1.5;
}

/* Responsive Settings */
@media (max-width: 992px) {
	.ledarportal-settings-page {
		padding: 1.5rem 0.75rem 3rem;
	}

	.ledarportal-settings-header {
		padding: 2rem 1.5rem 1.5rem;
	}

	.ledarportal-settings-title {
		font-size: 1.875rem;
	}

	.ledarportal-settings-form {
		padding: 2rem 1.5rem;
	}

	.ledarportal-settings-section {
		padding: 1.5rem;
	}

	.ledarportal-modules-list {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}

	.ledarportal-settings-actions {
		padding: 1.5rem;
	}
}

@media (max-width: 768px) {
	.ledarportal-settings-header {
		padding: 1.75rem 1.25rem 1.25rem;
	}

	.ledarportal-settings-title {
		font-size: 1.625rem;
		gap: 0.75rem;
	}

	.ledarportal-settings-title .dashicons {
		font-size: 2.25rem;
		width: 2.25rem;
		height: 2.25rem;
	}

	.ledarportal-settings-description {
		font-size: 1rem;
	}

	.ledarportal-settings-form {
		padding: 1.5rem 1.25rem;
	}

	.ledarportal-settings-section {
		padding: 1.25rem;
		margin-bottom: 1.5rem;
	}

	.ledarportal-settings-section-title {
		font-size: 1.25rem;
	}

	.ledarportal-form-row {
		grid-template-columns: 1fr;
	}

	.ledarportal-logo-preview {
		max-width: 220px;
		height: 220px;
	}

	.ledarportal-modules-list {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.ledarportal-image-buttons {
		flex-direction: column;
	}

	.ledarportal-image-buttons .ledarportal-btn {
		width: 100%;
	}

	.ledarportal-settings-actions {
		padding: 1.25rem;
		flex-direction: column;
	}

	.ledarportal-settings-actions .ledarportal-btn {
		width: 100%;
		min-width: auto;
	}
}

@media (max-width: 480px) {
	.ledarportal-settings-page {
		padding: 1rem 0.5rem 2rem;
	}

	.ledarportal-settings-header {
		padding: 1.5rem 1rem 1rem;
	}

	.ledarportal-settings-title {
		font-size: 1.375rem;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.ledarportal-settings-form {
		padding: 1.25rem 1rem;
	}

	.ledarportal-settings-section {
		padding: 1rem;
	}

	.ledarportal-logo-preview {
		max-width: 180px;
		height: 180px;
	}
}

/* ========================================
   SPELFORM INFORMATION
   ======================================== */

.ledarportal-spelform-info {
	max-width: 1200px;
	margin: 0 auto;
}

.ledarportal-spelform-edit-toolbar {
	margin-bottom: 30px;
	text-align: right;
}

/* Hero Section */
.ledarportal-spelform-hero {
	position: relative;
	width: 100%;
	height: 400px;
	margin-bottom: 40px;
	overflow: hidden;
	border-radius: 8px;
}

.ledarportal-spelform-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ledarportal-spelform-hero-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
	padding: 40px;
	color: #fff;
}

.ledarportal-spelform-hero-overlay h1 {
	margin: 0 0 10px 0;
	font-size: 48px;
	font-weight: 700;
}

.ledarportal-spelform-age {
	font-size: 20px;
	opacity: 0.9;
	margin: 0;
}

.ledarportal-spelform-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 3px solid #2271b1;
}

.ledarportal-spelform-header h1 {
	margin: 0 0 10px 0;
	font-size: 42px;
	color: #2271b1;
}

/* Introduction */
.ledarportal-spelform-intro {
	font-size: 18px;
	line-height: 1.8;
	margin-bottom: 40px;
	padding: 30px;
	background: #f8f9fa;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
}

/* Training Table */
.ledarportal-spelform-training {
	margin-bottom: 50px;
}

.ledarportal-spelform-training h2 {
	font-size: 32px;
	margin-bottom: 20px;
	color: #333;
}

.ledarportal-training-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border-radius: 8px;
	overflow: hidden;
}

.ledarportal-training-table th,
.ledarportal-training-table td {
	padding: 16px 20px;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
}

.ledarportal-training-table th {
	font-weight: 600;
	color: #2271b1;
	width: 30%;
	background: #f8f9fa;
}

.ledarportal-training-table td {
	color: #333;
}

.ledarportal-training-table tr:last-child th,
.ledarportal-training-table tr:last-child td {
	border-bottom: none;
}

/* Play Instructions & Skills Grid */
.ledarportal-spelform-play,
.ledarportal-spelform-skills {
	margin-bottom: 50px;
}

.ledarportal-spelform-play h2,
.ledarportal-spelform-skills h2 {
	font-size: 32px;
	margin-bottom: 30px;
	color: #333;
}

.ledarportal-play-grid,
.ledarportal-skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.ledarportal-play-card,
.ledarportal-skill-card {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
	transition: transform 0.2s, box-shadow 0.2s;
}

.ledarportal-play-card:hover,
.ledarportal-skill-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.ledarportal-play-icon,
.ledarportal-skill-icon {
	width: 60px;
	height: 60px;
	margin-bottom: 20px;
}

.ledarportal-play-icon img,
.ledarportal-skill-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ledarportal-play-card h3,
.ledarportal-skill-card h3 {
	font-size: 22px;
	margin: 0 0 15px 0;
	color: #2271b1;
}

.ledarportal-play-content ul,
.ledarportal-skill-content ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ledarportal-play-content ul li,
.ledarportal-skill-content ul li {
	padding-left: 25px;
	position: relative;
	margin-bottom: 10px;
	line-height: 1.6;
}

.ledarportal-play-content ul li:before,
.ledarportal-skill-content ul li:before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #46b450;
	font-weight: bold;
}

/* Exercises & Sessions Grid */
.ledarportal-spelform-exercises,
.ledarportal-spelform-sessions {
	margin-bottom: 50px;
}

.ledarportal-spelform-exercises h2,
.ledarportal-spelform-sessions h2 {
	font-size: 32px;
	margin-bottom: 30px;
	color: #333;
}

.ledarportal-exercises-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 25px;
}

.ledarportal-sessions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
}

.ledarportal-exercise-card,
.ledarportal-session-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: transform 0.2s, box-shadow 0.2s;
}

.ledarportal-exercise-card:hover,
.ledarportal-session-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.ledarportal-exercise-image,
.ledarportal-session-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.ledarportal-exercise-image img,
.ledarportal-session-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.ledarportal-exercise-card:hover .ledarportal-exercise-image img,
.ledarportal-session-card:hover .ledarportal-session-image img {
	transform: scale(1.05);
}

.ledarportal-exercise-content,
.ledarportal-session-content {
	padding: 20px;
}

.ledarportal-exercise-content h3,
.ledarportal-session-content h3 {
	margin: 0 0 10px 0;
	font-size: 18px;
}

.ledarportal-exercise-content h3 a,
.ledarportal-session-content h3 a {
	color: #333;
	text-decoration: none;
	transition: color 0.2s;
}

.ledarportal-exercise-content h3 a:hover,
.ledarportal-session-content h3 a:hover {
	color: #2271b1;
}

/* Gallery */
.ledarportal-spelform-gallery {
	margin-bottom: 50px;
}

.ledarportal-spelform-gallery h2 {
	font-size: 32px;
	margin-bottom: 30px;
	color: #333;
}

.ledarportal-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
}

.ledarportal-gallery-item {
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 8px;
}

.ledarportal-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.ledarportal-gallery-item:hover img {
	transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
	.ledarportal-spelform-hero {
		height: 300px;
	}

	.ledarportal-spelform-hero-overlay h1 {
		font-size: 32px;
	}

	.ledarportal-spelform-age {
		font-size: 16px;
	}

	.ledarportal-training-table th {
		width: 40%;
	}

	.ledarportal-play-grid,
	.ledarportal-skills-grid {
		grid-template-columns: 1fr;
	}

	.ledarportal-exercises-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}

	.ledarportal-sessions-grid {
		grid-template-columns: 1fr;
	}
}

/* ========================================
   Spelform Editor Modal
   ======================================== */

.ledarportal-spelform-modal .ledarportal-edit-modal-content {
	max-width: 900px;
	max-height: 90vh;
}

.ledarportal-spelform-modal .ledarportal-edit-modal-body {
	max-height: calc(90vh - 180px);
	overflow-y: auto;
	padding: 30px;
}

.ledarportal-spelform-form {
	background: #fff;
}

/* Form Sections */
.ledarportal-form-sections {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.ledarportal-form-section {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
}

.ledarportal-form-section h3 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
}

/* Featured Image Wrapper */
.ledarportal-featured-image-wrapper {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.ledarportal-image-preview {
	position: relative;
	min-height: 50px;
}

.ledarportal-image-preview img {
	max-width: 300px;
	max-height: 200px;
	width: auto;
	height: auto;
	border-radius: 4px;
	border: 1px solid #ddd;
	display: block;
	margin-bottom: 10px;
}

.ledarportal-image-preview .ledarportal-btn-small {
	padding: 6px 12px;
	font-size: 13px;
}

.ledarportal-form-row {
	margin-bottom: 20px;
}

.ledarportal-form-row:last-child {
	margin-bottom: 0;
}

.ledarportal-form-row label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #555;
	font-size: 14px;
}

.ledarportal-input,
.ledarportal-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	transition: border-color 0.3s ease;
}

.ledarportal-input:focus,
.ledarportal-textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.ledarportal-textarea {
	resize: vertical;
	min-height: 80px;
}

/* Image Upload */
.ledarportal-image-upload {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.ledarportal-preview-image {
	max-width: 300px;
	max-height: 200px;
	border-radius: 4px;
	border: 2px solid #ddd;
	object-fit: cover;
}

.repeater-image .ledarportal-preview-image {
	max-width: 100px;
	max-height: 100px;
}
/* Repeater */
.ledarportal-repeater {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 15px;
}

.ledarportal-repeater-row {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.ledarportal-repeater-row:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ledarportal-repeater-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 15px;
	background: #f5f5f5;
	border-bottom: 1px solid #ddd;
	cursor: pointer;
}

.ledarportal-repeater-title {
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.ledarportal-remove-row {
	padding: 4px 8px;
	background: transparent;
	border: none;
	color: #d63638;
	cursor: pointer;
	border-radius: 3px;
	transition: background-color 0.2s ease;
}

.ledarportal-remove-row:hover {
	background: #d63638;
	color: #fff;
}

.ledarportal-remove-row .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.ledarportal-repeater-content {
	padding: 20px;
}
/* Gallery Upload */
.ledarportal-gallery-upload {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.ledarportal-gallery-images {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 15px;
}

.ledarportal-gallery-item {
	position: relative;
	aspect-ratio: 1;
	border-radius: 6px;
	overflow: hidden;
	border: 2px solid #ddd;
	transition: border-color 0.3s ease;
}

.ledarportal-gallery-item:hover {
	border-color: #0073aa;
}

.ledarportal-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ledarportal-remove-gallery-item {
	position: absolute;
	top: 5px;
	right: 5px;
	padding: 4px;
	background: rgba(214, 54, 56, 0.9);
	border: none;
	color: #fff;
	cursor: pointer;
	border-radius: 3px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ledarportal-gallery-item:hover .ledarportal-remove-gallery-item {
	opacity: 1;
}

.ledarportal-remove-gallery-item:hover {
	background: #d63638;
}

.ledarportal-remove-gallery-item .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}
/* WYSIWYG Editors */
.ledarportal-wysiwyg,
.ledarportal-wysiwyg-small {
	width: 100%;
	min-height: 150px;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.ledarportal-wysiwyg-small {
	min-height: 100px;
}

/* Buttons */
.ledarportal-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ledarportal-btn-primary {
	background: #0073aa;
	color: #fff;
}

.ledarportal-btn-primary:hover {
	background: #005a87;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.ledarportal-btn-secondary {
	background: #f0f0f1;
	color: #2c3338;
	border: 1px solid #c3c4c7;
}

.ledarportal-btn-secondary:hover {
	background: #e5e5e5;
	border-color: #a7aaad;
}

.ledarportal-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none \!important;
}

.ledarportal-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.dashicons-spin {
	animation: dashicons-spin 1s infinite linear;
}

@keyframes dashicons-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
	.ledarportal-spelform-modal .ledarportal-edit-modal-content {
		max-width: 95%;
		margin: 20px auto;
	}
	.ledarportal-spelform-modal .ledarportal-edit-modal-body {
		padding: 20px;
	}
	.ledarportal-form-section {
		padding: 15px;
	}
	.ledarportal-gallery-images {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 10px;
	}
	.ledarportal-preview-image {
		max-width: 100%;
	}
}

/* ========================================
   Edit Modal Base Styles
   ======================================== */

/* Modal overlay */
.ledarportal-edit-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 100000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* WordPress Media Library should appear above our modal */
.media-modal {
	z-index: 100001 !important;
}

.media-modal-backdrop {
	z-index: 100000 !important;
}

.ledarportal-edit-modal.active {
	display: flex;
	opacity: 1;
}

/* Modal content */
.ledarportal-edit-modal-content {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	max-width: 800px;
	max-height: 85vh;
	width: 90%;
	display: flex;
	flex-direction: column;
	position: relative;
	animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Modal header */
.ledarportal-edit-modal-header {
	padding: 20px 25px;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ledarportal-edit-modal-header h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	color: #333;
}

.ledarportal-modal-close {
	background: transparent;
	border: none;
	padding: 5px;
	cursor: pointer;
	color: #666;
	font-size: 24px;
	line-height: 1;
	transition: color 0.2s ease;
}

.ledarportal-modal-close:hover {
	color: #d63638;
}

/* Modal body */
.ledarportal-edit-modal-body {
	padding: 25px;
	overflow-y: auto;
	flex: 1;
}

/* Modal footer */
.ledarportal-edit-modal-footer {
	padding: 20px 25px;
	border-top: 1px solid #e0e0e0;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* ========================================
   Spelform-Info Editor Modal
   ======================================== */

.ledarportal-spelform-info-modal .ledarportal-edit-modal-content {
	max-width: 1000px;
	max-height: 90vh;
}

.ledarportal-spelform-info-modal .ledarportal-edit-modal-body {
	max-height: calc(90vh - 180px);
	overflow-y: auto;
	padding: 30px;
}

/* Form inputs and selects */
.ledarportal-input,
.ledarportal-select,
.ledarportal-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s ease;
}

.ledarportal-input:focus,
.ledarportal-select:focus,
.ledarportal-textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.ledarportal-textarea {
	resize: vertical;
	min-height: 80px;
}

/* Sections List */
.ledarportal-sections-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 20px;
	min-height: 100px;
}

/* Section Row */
.ledarportal-section-row {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	transition: all 0.2s ease;
}

.ledarportal-section-row:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ledarportal-section-row.ui-sortable-helper {
	opacity: 0.8;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ledarportal-section-placeholder {
	background: #f0f0f1;
	border: 2px dashed #0073aa;
	border-radius: 6px;
	height: 60px;
	margin-bottom: 15px;
}

/* Section Header */
.ledarportal-section-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 15px;
	background: #f5f5f5;
	border-bottom: 1px solid #ddd;
	cursor: move;
}

.ledarportal-section-handle {
	color: #999;
	font-size: 20px;
	cursor: move;
	flex-shrink: 0;
}

.ledarportal-section-handle:hover {
	color: #0073aa;
}

.ledarportal-section-type-label {
	flex-grow: 1;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.ledarportal-section-actions {
	display: flex;
	gap: 5px;
}

.ledarportal-toggle-section,
.ledarportal-remove-section {
	padding: 4px 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	border-radius: 3px;
	transition: all 0.2s ease;
}

.ledarportal-toggle-section {
	color: #333;
}

.ledarportal-toggle-section:hover {
	background: #e0e0e0;
}

.ledarportal-remove-section {
	color: #d63638;
}

.ledarportal-remove-section:hover {
	background: #d63638;
	color: #fff;
}

.ledarportal-toggle-section .dashicons,
.ledarportal-remove-section .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Section Content */
.ledarportal-section-content {
	padding: 20px;
	display: none;
}

.ledarportal-section-row:first-child .ledarportal-section-content {
	display: block;
}

/* Add Section Controls */
.ledarportal-add-section-controls {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
}

.ledarportal-add-section-controls label {
	font-weight: 600;
	color: #333;
	margin: 0;
}

#section-type-select {
	flex-grow: 1;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
}

.ledarportal-add-section {
	flex-shrink: 0;
}

/* Table Builder */
.ledarportal-table-builder {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 10px;
}

.ledarportal-table-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.ledarportal-table-row-fields {
	flex-grow: 1;
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 10px;
}

.ledarportal-table-row input[name="table_col1[]"],
.ledarportal-table-row textarea[name="table_col2[]"] {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
}

.ledarportal-table-row textarea[name="table_col2[]"] {
	resize: vertical;
	min-height: 60px;
}

.ledarportal-remove-table-row {
	flex-shrink: 0;
	align-self: flex-start;
}

.ledarportal-add-table-row {
	margin-top: 5px;
}

/* Image Upload in Sections */
.section-image .ledarportal-preview-image {
	max-width: 300px;
	max-height: 200px;
	display: block;
	margin-bottom: 10px;
	border-radius: 4px;
	border: 1px solid #ddd;
}

/* Button Sizes */
.ledarportal-btn-small {
	padding: 6px 12px;
	font-size: 13px;
}

.ledarportal-btn-small .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* Responsive */
@media (max-width: 768px) {
	.ledarportal-spelform-info-modal .ledarportal-edit-modal-content {
		max-width: 95%;
		margin: 20px auto;
	}

	.ledarportal-spelform-info-modal .ledarportal-edit-modal-body {
		padding: 20px;
	}

	.ledarportal-add-section-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.ledarportal-table-row-fields {
		grid-template-columns: 1fr;
	}

	.ledarportal-section-header {
		padding: 10px;
	}

	.ledarportal-section-type-label {
		font-size: 13px;
	}
}

/* Editor Loading Indicator */
.ledarportal-editor-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	background: rgba(255, 255, 255, 0.95);
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1000;
}

.ledarportal-editor-loading span {
	color: #666;
	font-size: 14px;
	font-weight: 500;
}

.ledarportal-modal-content {
	position: relative;
}

/* Update: Make modal body relative for loading indicator */
.ledarportal-modal-body {
	position: relative;
}

/* Update: Make spinner visible in loading indicator */
.ledarportal-editor-loading .ledarportal-spinner {
	display: block;
	position: static;
	transform: none;
	width: 24px;
	height: 24px;
	border: 3px solid rgba(41, 161, 102, 0.2);
	border-top-color: #29A166;
}

/* ==========================================================================
   Modal Loading Overlay (New Implementation)
   ========================================================================== */

/* Full-screen loading overlay for modal content */
.ledarportal-modal-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.98);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	border-radius: 8px;
}

.ledarportal-modal-loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	padding: 2rem;
}

.ledarportal-modal-loading-content span {
	color: #333;
	font-size: 18px;
	font-weight: 600;
	margin: 0;
}

/* Large spinner for loading overlay */
.ledarportal-spinner-large {
	display: block;
	width: 48px;
	height: 48px;
	border: 5px solid rgba(41, 161, 102, 0.2);
	border-top-color: #29A166;
	border-radius: 50%;
	animation: ledarportal-spin 0.8s linear infinite;
}

/* Ensure modal body is relative for absolute positioning */
.ledarportal-modal-body {
	position: relative;
	min-height: 200px; /* Ensure there's space for loading indicator */
}


/* ==========================================================================
   Minimal Admin Menu för Mobil (samexistens med Beaver Themer-meny)
   ========================================================================== */
@media (max-width: 768px) {
	/* Gör admin-menyn minimal och kompakt - i nedre högra hörnet */
	.ledarportal-admin-nav {
		position: fixed;
		bottom: 20px;
		right: 20px;
		top: auto;
		left: auto;
		width: auto;
		z-index: 50; /* Mycket lägre än Beaver Themer för att inte blockera huvudmenyn */
		background: transparent;
		border: none;
		box-shadow: none;
	}

	.ledarportal-nav-container {
		padding: 0;
		height: auto;
		max-width: none;
		justify-content: flex-end;
	}

	/* Dölj logotypen på mobil */
	.ledarportal-nav-brand {
		display: none;
	}

	/* Gör användarmenyn minimal - en större klickbar cirkel */
	.ledarportal-nav-user,
	.ledarportal-nav-login {
		margin: 0;
		pointer-events: auto; /* Viktigt för klickbarhet */
	}

	.ledarportal-nav-user-toggle {
		padding: 0;
		width: 56px;
		height: 56px;
		min-width: 56px;
		border-radius: 50%;
		background: var(--ledarportal-primary);
		border: 3px solid #fff;
		box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
		justify-content: center;
	}

	.ledarportal-nav-user-toggle:hover,
	.ledarportal-nav-user-toggle:active {
		transform: scale(1.05);
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	}

	/* Dölj användarnamn, visa bara avatar */
	.ledarportal-nav-user-name {
		display: none;
	}

	/* Dölj pilen */
	.ledarportal-nav-user-toggle .dashicons-arrow-down-alt2 {
		display: none;
	}

	/* Avatar - gör den rund och större */
	.ledarportal-nav-avatar {
		width: 40px !important;
		height: 40px !important;
		border-radius: 50% !important;
		border: none;
	}

	/* Login-knapp för utloggade - STÖRRE och mer klickbar */
	.ledarportal-nav-login-btn {
		display: flex !important;
		padding: 0;
		width: 56px;
		height: 56px;
		min-width: 56px;
		border-radius: 50%;
		background: var(--ledarportal-primary);
		border: 3px solid #fff;
		box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
		justify-content: center;
		align-items: center;
		cursor: pointer;
		pointer-events: auto;
	}

	.ledarportal-nav-login-btn:hover,
	.ledarportal-nav-login-btn:active {
		transform: scale(1.05);
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	}

	.ledarportal-nav-login-text {
		display: none;
	}

	.ledarportal-nav-login-btn .dashicons {
		margin: 0;
		font-size: 24px;
		width: 24px;
		height: 24px;
		color: #fff;
	}

	/* Dropdown-meny - kompakt och öppnas uppåt från knappen */
	.ledarportal-nav-user-menu {
		position: fixed;
		bottom: 82px; /* Placeras ovanför knappen (56px knapp + 20px bottom + 6px gap) */
		right: 20px;
		top: auto;
		left: auto;
		width: 280px;
		max-width: calc(100vw - 20px);
		margin: 0;
		z-index: 50;
	}

	.ledarportal-nav-user-menu[aria-hidden="false"] {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.ledarportal-nav-user-menu[aria-hidden="true"] {
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px); /* Glider nedåt när den stängs (uppåt när den öppnas) */
	}

	/* Kompakta menyobjekt */
	.ledarportal-nav-user-menu-link {
		padding: 0.875rem 1rem;
		font-size: 0.9375rem;
	}

	.ledarportal-nav-user-info {
		padding: 0.875rem 1rem;
	}

	.ledarportal-nav-user-info-name {
		font-size: 1rem;
		font-weight: 600;
	}

	.ledarportal-nav-user-info-email {
		font-size: 0.8125rem;
	}
}

/* Extra liten skärm (< 480px) - fortfarande klickbar storlek */
@media (max-width: 480px) {
	.ledarportal-admin-nav {
		bottom: 16px;
		right: 16px;
	}

	.ledarportal-nav-user-toggle,
	.ledarportal-nav-login-btn {
		width: 52px;
		height: 52px;
		min-width: 52px;
	}

	.ledarportal-nav-avatar {
		width: 36px !important;
		height: 36px !important;
	}

	.ledarportal-nav-login-btn .dashicons {
		font-size: 22px;
		width: 22px;
		height: 22px;
	}

	.ledarportal-nav-user-menu {
		bottom: 74px; /* 52px knapp + 16px bottom + 6px gap */
		right: 16px;
		width: 260px;
	}

	/* Övning picker on mobile */
	.ledarportal-ovning-picker-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.ledarportal-ovning-picker-image {
		height: 160px;
	}

	.ledarportal-filter-btn {
		font-size: 0.8125rem;
		padding: 0.4rem 0.75rem;
	}

	.ledarportal-ovning-picker-filters {
		padding: 0.75rem;
	}
}
