/**
 * Lumo Team Messenger - Frontend Standalone Page
 *
 * Chrome for the dedicated public messenger URL: full-viewport app layout,
 * top bar, and the login / passcode / denied auth screens. The messenger UI
 * itself is 100% shared with wp-admin (messenger.css and friends).
 *
 * @package LumoTeamMessenger
 * @since   2.213.0
 */

/* ==========================================================================
   Base document
   ========================================================================== */

body.ltm-front-body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background: #f1f5f9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	color: #0f172a;
}

[dir="rtl"] body.ltm-front-body,
[dir="rtl"] body.ltm-front-body input,
[dir="rtl"] body.ltm-front-body button,
[dir="rtl"] body.ltm-front-body a {
	font-family: "YekanX", Tahoma, Arial, sans-serif;
	-moz-font-feature-settings: "ss02";
	-webkit-font-feature-settings: "ss02";
	font-feature-settings: "ss02";
}

[dir="rtl"] body.ltm-front-body .fas,
[dir="rtl"] body.ltm-front-body .far,
[dir="rtl"] body.ltm-front-body .fab,
[dir="rtl"] body.ltm-front-body [class*="fa-"] {
	font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
	font-feature-settings: normal;
}

/* ==========================================================================
   App view: top bar + full viewport messenger
   ========================================================================== */

body.ltm-front-view-app {
	overflow: hidden;
	height: 100vh;
}

.ltm-front-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 14px;
	background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
	color: #e2e8f0;
	z-index: 10050;
	box-sizing: border-box;
}

.ltm-front-topbar-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ltm-front-topbar-brand img {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	object-fit: cover;
}

.ltm-front-topbar-brand i {
	color: var(--ltm-front-primary, #a855f7);
	font-size: 16px;
}

.ltm-front-topbar-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.ltm-front-topbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	color: #e2e8f0 !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.2s ease, border-color 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ltm-front-topbar-btn:hover,
.ltm-front-topbar-btn:focus {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.3);
	color: #ffffff !important;
	outline: none;
}

.ltm-front-topbar-btn i {
	font-size: 13px;
}

.ltm-front-topbar-logout:hover {
	background: rgba(239, 68, 68, 0.25);
	border-color: rgba(239, 68, 68, 0.5);
}

/* Messenger wrap fills the viewport below the top bar. */
body.ltm-front-view-app .ltm-wrap {
	position: fixed !important;
	top: 44px !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	z-index: 9990;
}

@media screen and (max-width: 782px) {
	.ltm-front-topbar-btn span {
		display: none;
	}

	.ltm-front-topbar-btn {
		padding: 8px 10px;
	}
}

/* ==========================================================================
   Auth screens (login / passcode / denied)
   ========================================================================== */

.ltm-front-auth {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
	background:
		radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--ltm-front-primary, #a855f7) 22%, transparent), transparent),
		radial-gradient(900px 420px at 0% 110%, color-mix(in srgb, var(--ltm-front-primary, #a855f7) 14%, transparent), transparent),
		linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.ltm-front-card {
	width: 100%;
	max-width: 420px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
	padding: 34px 30px 28px;
	box-sizing: border-box;
}

.ltm-front-card-narrow {
	max-width: 380px;
}

.ltm-front-brand {
	text-align: center;
	margin-bottom: 22px;
}

.ltm-front-logo {
	width: 64px;
	height: 64px;
	border-radius: 16px;
	object-fit: contain;
	margin-bottom: 12px;
}

.ltm-front-logo-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 18px;
	background: color-mix(in srgb, var(--ltm-front-primary, #a855f7) 14%, #ffffff);
	color: var(--ltm-front-primary, #a855f7);
	font-size: 26px;
	margin-bottom: 12px;
}

.ltm-front-logo-muted {
	background: #f1f5f9;
	color: #64748b;
}

.ltm-front-avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 12px;
	border: 3px solid color-mix(in srgb, var(--ltm-front-primary, #a855f7) 35%, #ffffff);
}

.ltm-front-title {
	margin: 0 0 6px;
	font-size: 21px;
	font-weight: 700;
	color: #0f172a;
}

.ltm-front-subtitle {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: #64748b;
}

.ltm-front-welcome {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #475569;
	background: #f8fafc;
	border-radius: 10px;
	padding: 10px 12px;
}

.ltm-front-error {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 16px;
}

.ltm-front-error i {
	margin-top: 2px;
	flex-shrink: 0;
}

.ltm-front-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ltm-front-field label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
}

.ltm-front-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.ltm-front-input-wrap i {
	position: absolute;
	inset-inline-start: 12px;
	color: #94a3b8;
	font-size: 14px;
	pointer-events: none;
}

.ltm-front-input-wrap input {
	width: 100%;
	padding: 11px 14px;
	padding-inline-start: 38px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 14px;
	color: #0f172a;
	background: #ffffff;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ltm-front-input-wrap input:focus {
	outline: none;
	border-color: var(--ltm-front-primary, #a855f7);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ltm-front-primary, #a855f7) 18%, transparent);
}

.ltm-front-passcode-wrap input {
	text-align: center;
	letter-spacing: 8px;
	font-size: 20px;
	font-weight: 700;
	padding-inline-start: 38px;
}

.ltm-front-captcha {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ltm-front-captcha-q {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 10px 14px;
	background: #f1f5f9;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	color: #334155;
	font-variant-numeric: tabular-nums;
}

.ltm-front-captcha input {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 15px;
	text-align: center;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
}

.ltm-front-captcha input:focus {
	outline: none;
	border-color: var(--ltm-front-primary, #a855f7);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ltm-front-primary, #a855f7) 18%, transparent);
}

.ltm-front-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #475569;
	cursor: pointer;
	user-select: none;
}

.ltm-front-remember input {
	width: 16px;
	height: 16px;
	accent-color: var(--ltm-front-primary, #a855f7);
	cursor: pointer;
}

.ltm-front-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 18px;
	border: none;
	border-radius: 10px;
	background: var(--ltm-front-primary, #a855f7);
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.1s ease;
	text-decoration: none !important;
	appearance: none;
	-webkit-appearance: none;
}

.ltm-front-btn:hover,
.ltm-front-btn:focus {
	filter: brightness(0.92);
	outline: none;
}

.ltm-front-btn:active {
	transform: translateY(1px);
}

.ltm-front-btn-secondary {
	background: #f1f5f9;
	color: #334155 !important;
}

.ltm-front-btn-danger {
	background: #fef2f2;
	color: #b91c1c !important;
}

.ltm-front-btn-row {
	display: flex;
	gap: 8px;
}

.ltm-front-btn-row .ltm-front-btn {
	width: auto;
	flex: 1;
}

.ltm-front-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #f1f5f9;
}

.ltm-front-links a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--ltm-front-primary, #a855f7) !important;
	text-decoration: none !important;
	font-weight: 500;
}

.ltm-front-links a:hover {
	text-decoration: underline !important;
}

.ltm-front-note {
	margin: 0;
	font-size: 12px;
	line-height: 1.7;
	color: #94a3b8;
}

.ltm-front-details {
	margin-top: 18px;
	border-top: 1px solid #f1f5f9;
	padding-top: 14px;
}

.ltm-front-details summary {
	font-size: 13px;
	color: #64748b;
	cursor: pointer;
	font-weight: 500;
	margin-bottom: 10px;
}

.ltm-front-details[open] summary {
	color: var(--ltm-front-primary, #a855f7);
}

.ltm-front-details .ltm-front-form {
	margin-top: 8px;
}

/* Honeypot: visually removed but present for bots. */
.ltm-front-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   In-app passcode overlay
   ========================================================================== */

.ltm-front-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	z-index: 10100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ltm-front-overlay .ltm-front-card {
	max-height: 90vh;
	overflow-y: auto;
}
