/*
 * LordPanel
 * Base Styles
 * Version: 1.7
 */

/* ─── Theme Variables ───────────────────────────────────────────── */
:root {
	--theme-first-color: #333333;
	--theme-second-color: #0a1981;
	--theme-third-color: #415696;
	--theme-light-color: #b7b6b7;
	--theme-dark-color: black;
	--theme-hover-color: #e0f8fc;
	--theme-bg-light: #444444;
	--theme-bg-dark: #1f1f1f;
	--theme-border: #555555;
}

/* ─── Base ──────────────────────────────────────────────────────── */
body {
	margin: 0;
	background: linear-gradient(135deg, var(--theme-first-color) 0%, var(--theme-bg-dark) 100%);
	background-attachment: fixed;
	font-size: 20px;
	/* 100 renders as near-invisible hairlines on Safari/iOS — 300 is the safe minimum */
	font-weight: 300;
	color: var(--theme-light-color);
	max-width: 100%;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-style: normal;
	font-variant: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	animation: pageLoad 0.2s ease;
}

@keyframes pageLoad {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* ─── Scrollbar ─────────────────────────────────────────────────── */
/* No custom scrollbar styling — browser default handles it. */

/* ─── Headings ──────────────────────────────────────────────────── */
h1 {
	font-size: 1.8em;
	font-weight: 300;
	margin-bottom: 0.6em;
	color: var(--theme-light-color);
	letter-spacing: 0.02em;
}

h2 {
	font-size: 1.2em;
	font-weight: 400;
	margin-bottom: 0.75em;
	color: var(--theme-light-color);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.9;
}

/* Field section label inside the editor */
h3.editorTitle {
	font-size: 0.72em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--theme-third-color);
	margin-bottom: 0.4em;
	opacity: 0.9;
}

/* List section headers injected by sort closures (e.g. Active / Completed tasks) */
h3.listSectionHeader {
	font-size: 0.72em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--theme-third-color);
	margin: 0.9em 0 0.4em 0;
	opacity: 0.9;
}

/* Generic h3 — editor metadata rows (Asset ID, Saved By, IP…) */
h3 {
	font-size: 0.75em;
	font-weight: 400;
	color: var(--theme-light-color);
	opacity: 0.5;
	margin-bottom: 0.25em;
	text-transform: none;
	letter-spacing: 0;
}

/* ─── Misc ──────────────────────────────────────────────────────── */
ul {
	padding-left: 0.5em;
}

li {
	margin-bottom: 0.5em;
}

/* ─── Home Avatar Pill ──────────────────────────────────────────── */
.homeHeaderContainer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px 20px;
	flex-wrap: wrap;
	gap: 15px;
}

@media (max-width: 600px) {
	.homeHeaderContainer {
		justify-content: center;
		flex-direction: column;
	}
}

.homeAvatarPill {
	display: flex;
	align-items: center;
	background: var(--theme-first-color);
	border: 1px solid var(--theme-third-color);
	border-radius: 50px;
	padding: 5px 15px 5px 5px;
	gap: 10px;
	font-weight: 500;
	color: var(--theme-light-color);
	font-size: 0.85em;
	white-space: nowrap;
	max-width: 100%;
	box-sizing: border-box;
}

.homeAvatarPill span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.homeAvatarPill img,
.homeAvatarPill .avatarFallback {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.homeAvatarPill .avatarFallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--theme-second-color);
	color: white;
	font-size: 16px;
}

.homeHeaderContainer img.headerLogo {
	max-height: 75px;
	object-fit: contain;
}

/* ─── Editor Info Pill ──────────────────────────────────────────── */
/* Collapsible metadata pill sitting inline next to the editor h2 */
.editorInfoPill {
	display: inline-block;
	vertical-align: middle;
	margin-left: 0.6em;
	position: relative;
	top: -0.05em;
	list-style: none;
	font-size: 0.72em;
}

.editorInfoPill>summary {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	cursor: pointer;
	padding: 0.25em 0.7em;
	border-radius: 20px;
	background: color-mix(in srgb, var(--theme-third-color) 20%, transparent);
	border: 1px solid color-mix(in srgb, var(--theme-third-color) 35%, transparent);
	color: var(--theme-light-color);
	opacity: 0.75;
	user-select: none;
	list-style: none;
	transition: opacity 0.15s, background 0.15s;
	white-space: nowrap;
	letter-spacing: 0.03em;
	font-weight: 500;
}

.editorInfoPill>summary::-webkit-details-marker {
	display: none;
}

.editorInfoPill>summary::marker {
	display: none;
}

.editorInfoPill:hover>summary,
.editorInfoPill[open]>summary {
	opacity: 1;
	background: color-mix(in srgb, var(--theme-third-color) 35%, transparent);
}

.editorInfoPill__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 100;
	min-width: 240px;
	max-width: 380px;
	padding: 0.6em 0.85em;
	border-radius: 10px;
	background: color-mix(in srgb, var(--theme-first-color) 92%, black);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid color-mix(in srgb, var(--theme-light-color) 12%, transparent);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	color: var(--theme-light-color);
	opacity: 0.9;
}

.editorInfoPill__row {
	display: flex;
	align-items: baseline;
	gap: 0.4em;
	padding: 0.25em 0;
	font-size: 0.95em;
	line-height: 1.35;
	border-bottom: 1px solid color-mix(in srgb, var(--theme-light-color) 8%, transparent);
}

.editorInfoPill__row:last-child {
	border-bottom: none;
}

.editorInfoPill__label {
	flex-shrink: 0;
	font-weight: 600;
	opacity: 0.55;
	text-transform: uppercase;
	font-size: 0.78em;
	letter-spacing: 0.06em;
	min-width: 5em;
}

.editorInfoPill__value {
	word-break: break-all;
	opacity: 0.9;
}

.editorInfoPill__value a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	opacity: 0.85;
}

.editorInfoPill__value a:hover {
	opacity: 1;
}

hr {
	border: none;
	border-top: 1px solid color-mix(in srgb, var(--theme-light-color) 12%, transparent);
	margin: 1.2em 0;
}

.container {
	margin: 1em auto;
	padding: 1em;
	background: linear-gradient(145deg, var(--theme-bg-light) 0%, var(--theme-bg-dark) 100%);
	max-width: 1200px;
	border-radius: 12px;
	border: 1px solid var(--theme-border);
}

a {
	text-decoration: underline;
	color: var(--theme-light-color);
	transition: color 0.2s ease;
}

a:hover {
	text-decoration: underline;
	color: white;
}

/* ─── Form inputs ───────────────────────────────────────────────── */
input,
select,
a.button,
textarea,
.fileUploadLabel {
	border: 1px solid color-mix(in srgb, var(--theme-light-color) 20%, transparent);
	margin: 0.4em 0 1.2em 0;
	width: 100%;
	border-radius: 5px;
	padding: 0.4em;
	background-color: #f9f9f9;
	color: #111;
	font-size: 1em;
}

/* Select needs a solid background — transparent or near-transparent causes
   the dropdown popup to use OS defaults (white on most systems) making
   the options unreadable on dark themes. Use the page background colour. */
select {
	background-color: #f9f9f9;
	color: #111;
}

select option {
	background-color: white;
	color: black;
}

input::placeholder,
textarea::placeholder {
	color: #888;
}

.fileUploadLabel {
	margin-top: 0px !important;
}

a.button .notificationArea {
	background-color: red;
	color: white;
	padding: 5px 10px;
	margin-left: 10px;
	position: relative;
	border-radius: 10px;
	font-weight: bold;
}

label {
	font-weight: 400;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--theme-second-color);
	outline: none;
	transition: border-color 0.2s;
}

:disabled {
	opacity: 0.45;
}

.disabledMessage {
	color: var(--theme-third-color);
	opacity: 0.7;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
input[type="submit"],
a.button,
.fileUploadLabel {
	background-color: var(--theme-dark-color);
	border: 1px solid var(--theme-dark-color);
	color: white;
	transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
	display: block;
	cursor: pointer;
	text-decoration: none;
	font-weight: 400;
	letter-spacing: 0.02em;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	border-radius: 5px;
}

input[type="submit"]:hover,
a.button:hover,
.fileUploadLabel:hover {
	background-color: var(--theme-second-color);
	border-color: var(--theme-second-color);
	color: white;
	text-decoration: none;
}

input[type="submit"].red,
a.button.red,
.fileUploadChanged {
	border-color: #c0392b;
	background-color: #c0392b;
	color: white;
	text-decoration: none;
}

input[type="submit"].red:hover,
a.button.red:hover,
.fileUploadChanged:hover {
	background-color: color-mix(in srgb, #c0392b 80%, black);
	border-color: color-mix(in srgb, #c0392b 80%, black);
	color: white;
	text-decoration: none;
}

input[type="submit"].blue,
a.button.blue {
	border-color: #2980b9;
	background-color: #2980b9;
	color: white;
	text-decoration: none;
}

input[type="submit"].blue:hover,
a.button.blue:hover {
	background-color: color-mix(in srgb, #2980b9 80%, black);
	border-color: color-mix(in srgb, #2980b9 80%, black);
	color: white;
	text-decoration: none;
}

input[type="submit"].green,
a.button.green {
	border-color: #2ecc71;
	background-color: #2ecc71;
	color: white;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

input[type="submit"].green:hover,
a.button.green:hover {
	background-color: #27ae60;
	border-color: #27ae60;
	color: white;
	text-decoration: none;
}

input[type="submit"].orange,
a.button.orange {
	border-color: #e67e22;
	background-color: #e67e22;
	color: white;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

input[type="submit"].orange:hover,
a.button.orange:hover {
	background-color: #d35400;
	border-color: #d35400;
	color: white;
	text-decoration: none;
}

input[type="submit"].lightBlue,
a.button.lightBlue {
	border-color: var(--theme-second-color);
	background-color: var(--theme-second-color);
	color: white;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

input[type="submit"].lightBlue:hover,
a.button.lightBlue:hover {
	background-color: color-mix(in srgb, var(--theme-second-color) 80%, black);
	border-color: color-mix(in srgb, var(--theme-second-color) 80%, black);
	color: white;
	text-decoration: none;
}

input[type="submit"].yellow,
a.button.yellow {
	border-color: #e67e22;
	background-color: #e67e22;
	color: white;
	text-decoration: none;
}

input[type="submit"].yellow:hover,
a.button.yellow:hover {
	background-color: color-mix(in srgb, #e67e22 80%, black);
	border-color: color-mix(in srgb, #e67e22 80%, black);
	color: white;
	text-decoration: none;
}

input[type="submit"].highLight,
a.button.highLight {
	border-color: var(--theme-second-color);
	background-color: var(--theme-second-color);
	color: white;
	text-decoration: none;
}

input[type="submit"].highLight:hover,
a.button.highLight:hover {
	background-color: color-mix(in srgb, var(--theme-second-color) 80%, black);
	border-color: color-mix(in srgb, var(--theme-second-color) 80%, black);
	color: white;
	text-decoration: none;
}

input[type="checkbox"] {
	margin: 0.5em 0.25em 0.5em 0;
	width: auto;
}

a.button {
	cursor: pointer !important;
}

/* ─── Text helpers ──────────────────────────────────────────────── */
p.offset {
	margin: 0.5em;
}

p.offset label {
	font-weight: 300;
}

.center {
	text-align: center;
}

p.previewData {
	opacity: 0.85;
	font-size: 1.2em;
	padding: 5px;
	margin-bottom: 5px;
}

p.small {
	font-size: 0.75em;
}

/* ─── File upload widgets ───────────────────────────────────────── */
.fileUpload {
	position: relative;
	display: block;
	width: 400px;
	max-width: 100%;
	text-align: center;
	margin-bottom: 0.5em !important;
}

.fileUpload>label {
	margin-bottom: 0.5em;
}

.fileDelete {
	margin-bottom: 1em !important;
	margin-top: 0px;
}

.fileDelete input[type="checkbox"]+label {
	opacity: 0.3;
}

.fileDelete input[type="checkbox"]:checked+label {
	opacity: 1 !important;
	color: #e74c3c;
}

.fileDownload {
	position: relative;
	display: block;
	width: 100%;
	max-width: 400px;
	text-align: center;
	margin-bottom: 0.5em !important;
}

.fileUploadLabel {
	display: block;
	text-align: center;
}

.fileUploadInput {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	font-size: 1;
	width: 0;
	height: 100%;
	opacity: 0;
}

.fileName {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	font-weight: 300;
}

.imgPreview {
	margin-bottom: 0.5em;
	border: 1px solid var(--theme-third-color);
}

/* ─── Embeds ────────────────────────────────────────────────────── */
.embedActive {
	background-color: color-mix(in srgb, var(--theme-third-color) 15%, transparent);
	border: 1px solid color-mix(in srgb, var(--theme-third-color) 50%, transparent);
	padding: 1em;
	border-radius: 5px;
	margin-bottom: 1.5em;
	display: none;
}

.embedActive label::before {
	content: "> ";
}

.fileUpload label::before {
	content: "";
	color: inherit;
}

textarea {
	resize: vertical;
}

ul.subtitles {
	font-size: 0.9em;
	font-weight: bold;
	line-height: 0.9em;
}

/* ─── Footer ────────────────────────────────────────────────────── */
/* Slim pill, bottom-left. Stays out of the scrollbar gutter.
   aichat input sits at bottom:44px, which comfortably clears this. */
footer {
	position: fixed;
	bottom: 16px;
	left: 1em;
	padding: clamp(8px, 1.2vh, 10px) clamp(17px, 1.8vw, 20px);
	border-radius: 30px;
	background-color: color-mix(in srgb, var(--theme-second-color) 90%, black);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid color-mix(in srgb, var(--theme-light-color) 15%, transparent);
	font-size: clamp(0.82em, 1vw + 0.4em, 0.9em);
	white-space: nowrap;
}

footer a {
	text-decoration: none;
	color: var(--theme-light-color);
}

footer a:hover {
	text-decoration: underline;
}

/* Extra bottom padding so content is never hidden behind the footer */
body {
	padding-bottom: 3em;
}

/* ─── List / pagination ─────────────────────────────────────────── */
#footerBar {
	margin-bottom: 4em;
}

#autoFilter {
	margin: 0 0 0.5em 0;
}

p.versionInfo {
	font-weight: bold;
	font-size: 0.75em;
	opacity: 0.5;
	text-align: center;
}

.pageButton {
	display: inline-block;
	padding: 5px 12px;
	background-color: color-mix(in srgb, var(--theme-third-color) 55%, transparent);
	font-weight: 400;
	text-decoration: none;
	border-radius: 6px;
	margin: 3px;
	font-size: 0.85em;
	transition: background-color 0.15s;
}

.pageButton:hover {
	background-color: var(--theme-third-color);
}

.pageButtonActive {
	background-color: var(--theme-second-color);
	color: white;
}

.pageButtonActive:hover {
	background-color: var(--theme-second-color);
}