/* SJ Learn Network — front-end styles */

/* ── Verification overlay ── */
.sjl-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
}

.sjl-verify-box {
	background: #fff;
	border-radius: 10px;
	padding: 2.5rem 3rem;
	max-width: 480px;
	width: 90%;
	text-align: center;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.sjl-verify-box h2 {
	margin-top: 0;
	font-size: 1.5rem;
	color: #1a1a2e;
}

.sjl-verify-box p {
	color: #444;
	line-height: 1.6;
}

/* ── Buttons ── */
.sjl-btn,
a.sjl-btn,
.sjl-notice-success .sjl-btn,
.sjl-teacher-application .sjl-btn {
	display: inline-block;
	padding: .65rem 1.4rem;
	background: #2563eb;
	color: #ffffff !important;
	border: none;
	border-radius: 6px;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .2s, color .2s;
}

.sjl-btn:hover,
a.sjl-btn:hover,
.sjl-notice-success .sjl-btn:hover,
.sjl-teacher-application .sjl-btn:hover {
	background: #1d4ed8;
	color: #ffffff !important;
}

.sjl-btn-link {
	background: none;
	border: none;
	color: #2563eb;
	cursor: pointer;
	padding: 0;
	font-size: inherit;
	text-decoration: underline;
}

/* ── Notices ── */
.sjl-notice {
	padding: .9rem 1.2rem;
	border-radius: 6px;
	margin-bottom: 1rem;
}

.sjl-notice-info    { background: #eff6ff; border-left: 4px solid #2563eb; color: #1e40af; }
.sjl-notice-success { background: #f0fdf4; border-left: 4px solid #16a34a; color: #15803d; }
.sjl-notice-warning { background: #fffbeb; border-left: 4px solid #d97706; color: #92400e; }
.sjl-notice-error   { background: #fef2f2; border-left: 4px solid #dc2626; color: #991b1b; }

/* ── Learning / Teaching space switcher (dual-space users) ── */
.sjl-space-mode-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	border-bottom: 1px solid transparent;
	position: sticky;
	top: var(--sj-header-offset, 80px);
	z-index: 9990;
}

.sjl-space-mode-banner--learning {
	background: #eff6ff;
	color: #1e40af;
	border-bottom-color: #bfdbfe;
}

.sjl-space-mode-banner--teaching {
	background: #f0fdfa;
	color: #0f766e;
	border-bottom-color: #99f6e4;
}

/* Sub-site pages use full-width content (header stays full width too). */
body.sjl-space-teacher .site-main > .container,
body.sjl-space-student .site-main > .container,
body.sjl-space-teacher .site-footer .container,
body.sjl-space-student .site-footer .container {
	max-width: none;
	width: 100%;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	box-sizing: border-box;
}

body.sjl-space-teacher .site-main,
body.sjl-space-student .site-main,
body.sjl-space-teacher #page.site,
body.sjl-space-student #page.site,
body.sjl-space-teacher .sjl-dashboard-shell,
body.sjl-space-student .sjl-dashboard-shell,
body.sjl-space-teacher .sjl-dashboard-shell .entry-content,
body.sjl-space-student .sjl-dashboard-shell .entry-content {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

body.sjl-space-teacher,
body.sjl-space-student {
	--lp-container-max-width: 100%;
}

body.sjl-space-teacher #learn-press-profile,
body.sjl-space-student #learn-press-profile,
body.sjl-space-teacher #learn-press-profile .lp-content-area,
body.sjl-space-student #learn-press-profile .lp-content-area,
body.sjl-space-teacher #learn-press-profile .lp-profile-content-area,
body.sjl-space-student #learn-press-profile .lp-profile-content-area,
body.sjl-space-teacher .learnpress .lp-content-area,
body.sjl-space-student .learnpress .lp-content-area {
	max-width: none !important;
	width: 100% !important;
	box-sizing: border-box;
}

body.sjl-space-teacher #learn-press-profile .lp-content-area,
body.sjl-space-student #learn-press-profile .lp-content-area {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: flex-start;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

body.sjl-space-teacher #learn-press-profile #profile-sidebar,
body.sjl-space-student #learn-press-profile #profile-sidebar {
	float: none !important;
	width: 100% !important;
	max-width: 320px;
	flex: 0 0 280px;
	margin: 0;
}

body.sjl-space-teacher #learn-press-profile .lp-profile-content,
body.sjl-space-student #learn-press-profile .lp-profile-content {
	float: none !important;
	flex: 1 1 480px;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
}

.sjl-space-switcher {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .5rem 1rem;
	padding: .65rem 1.25rem;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	font-size: .9rem;
}

.sjl-space-switcher__label {
	color: #64748b;
	font-weight: 600;
}

.sjl-space-switcher__tab {
	display: inline-block;
	padding: .35rem .9rem;
	border-radius: 999px;
	text-decoration: none !important;
	color: #334155 !important;
	background: #fff;
	border: 1px solid #cbd5e1;
	font-weight: 600;
}

.sjl-space-switcher__tab:hover {
	border-color: #2563eb;
	color: #2563eb !important;
}

.sjl-space-switcher__tab.is-active {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff !important;
}

.sjl-space-teacher .sjl-space-switcher__tab.is-active {
	background: #0d9488;
	border-color: #0d9488;
}

body.sjl-space-student .sjl-space-switcher__tab.is-active {
	background: #2563eb;
	border-color: #2563eb;
}

.sjl-space-switcher__tab--learn.is-active {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff !important;
}

.sjl-space-switcher__tab--teach.is-active {
	background: #0d9488;
	border-color: #0d9488;
	color: #ffffff !important;
}

/* ── Floating Learn / Teach switch ── */
.sjl-floating-space-switch {
	position: fixed;
	z-index: 99988;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 4px 6px 4px 10px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.sjl-floating-space-switch__hint {
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
	padding-right: 0.15rem;
	white-space: nowrap;
}

.sjl-floating-space-switch--bottom-right {
	right: 20px;
	bottom: 20px;
}

.sjl-floating-space-switch--bottom-left {
	left: 20px;
	bottom: 20px;
}

.sjl-floating-space-switch--bottom-center {
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
}

.sjl-floating-space-switch .sjl-space-switcher__tab {
	border: none;
	background: transparent;
	padding: 0.55rem 1.1rem;
	font-size: 0.875rem;
}

.sjl-floating-space-switch .sjl-space-switcher__tab:not(.is-active):hover {
	background: #f1f5f9;
	color: #0f172a !important;
}

/* Active tab must beat the transparent base above (same 0,2,0 specificity). */
.sjl-floating-space-switch .sjl-space-switcher__tab--learn.is-active {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff !important;
}

.sjl-floating-space-switch .sjl-space-switcher__tab--teach.is-active {
	background: #0d9488;
	border-color: #0d9488;
	color: #ffffff !important;
}

@media (max-width: 640px) {
	.sjl-floating-space-switch--bottom-right,
	.sjl-floating-space-switch--bottom-left {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
	}
}

/* ── One-time teacher unlock banner (post-approval) ── */
.sjl-teacher-unlock-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: .75rem 1.25rem;
	padding: .85rem 1.25rem;
	background: #ecfdf5;
	border-bottom: 1px solid #99f6e4;
	color: #0f766e;
	font-size: .95rem;
}

.sjl-teacher-unlock-notice__text {
	margin: 0;
	font-weight: 600;
}

.sjl-teacher-unlock-notice__btn {
	background: #0d9488 !important;
	padding: .45rem 1rem !important;
	font-size: .875rem !important;
}

.sjl-teacher-unlock-notice__btn:hover {
	background: #0f766e !important;
}

/* ── Teacher application ── */
.sjl-teacher-application {
	max-width: 600px;
}

.sjl-teacher-application h3 {
	margin-top: 0;
}

.sjl-message {
	margin-top: .75rem;
	font-size: .9rem;
}

/* ── Registration form field ── */
.sjl-form-field {
	margin-bottom: 1rem;
}

.sjl-form-field label {
	display: block;
	margin-bottom: .3rem;
	font-weight: 600;
}

.sjl-form-field input {
	width: 100%;
	padding: .55rem .8rem;
	border: 1px solid #d1d5db;
	border-radius: 5px;
	font-size: 1rem;
	box-sizing: border-box;
}

/* ── Admin bar ── */
#wp-admin-bar-sjl-switcher .ab-item::before {
	content: "🎓 ";
}

/* ── Teacher shortcodes reference (front-end) ── */
.sjl-teacher-shortcodes__intro {
	margin-bottom: 1.5rem;
}

.sjl-teacher-shortcodes__pages {
	margin: 0 0 2rem 1.25rem;
	line-height: 1.8;
}

.sjl-teacher-shortcodes__lead {
	color: #475569;
	margin-bottom: 1.25rem;
}

.sjl-shortcode-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #0d9488;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
	max-width: 820px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sjl-shortcode-card h3 {
	margin: 0 0 .5rem;
	font-size: 1.1rem;
	color: #0f172a;
}

.sjl-shortcode-card p {
	color: #475569;
	line-height: 1.6;
	margin: 0 0 .75rem;
}

.sjl-shortcode-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: .65rem;
}

.sjl-shortcode-card__badge {
	background: #ecfdf5;
	color: #0f766e;
	font-size: .75rem;
	font-weight: 600;
	padding: .15rem .55rem;
	border-radius: 999px;
}

.sjl-shortcode-card__where {
	color: #64748b;
	font-size: .8rem;
}

.sjl-copy-row {
	display: flex;
	align-items: center;
	gap: .65rem;
	flex-wrap: wrap;
	margin-top: .5rem;
}

.sjl-code-tag {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .95rem;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: .55rem .85rem;
	color: #0f766e;
	flex: 1;
	min-width: 200px;
}

.sjl-copy-btn.copied {
	background: #16a34a !important;
	border-color: #16a34a !important;
	color: #fff !important;
}

.sjl-shortcode-card__note {
	font-size: .85rem;
	color: #64748b;
	margin-top: .5rem !important;
}
