/* Ardenfall - own look on top of the tibiacom layout (loaded after basic.css). */
:root {
	--af-night: #0d1218;
	--af-night-2: #141c26;
	--af-panel: #1a2430;
	--af-panel-2: #212d3b;
	--af-line: #2e3d4e;
	--af-gold: #e2b340;
	--af-gold-deep: #b8871f;
	--af-text: #e7e3d8;
	--af-muted: #97a3b0;
	--af-paper: #f5f3ee;
	--af-paper-2: #ebe7de;
	--af-ink: #1f252c;
	--af-ink-soft: #4a525c;
	--af-link: #1e5c86;
	--af-link-hover: #133f5f;
	--af-green: #3fae7c;
	--af-red: #d0543f;
	--af-radius: 10px;
	--af-font: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
	--af-display: "Uncial Antiqua", Georgia, "Times New Roman", serif;
}

/* ---------- page ---------- */
html, body { height: auto; }
body {
	background-color: var(--af-night);
	background-image:
		radial-gradient(ellipse 900px 420px at 50% -120px, rgba(226, 179, 64, .16), transparent 70%),
		radial-gradient(ellipse 700px 500px at 100% 0, rgba(63, 174, 124, .07), transparent 70%),
		linear-gradient(180deg, var(--af-night-2) 0, var(--af-night) 520px);
	background-repeat: no-repeat;
	color: var(--af-text);
	font-family: var(--af-font);
}
#ArtworkHelper { background: none !important; min-width: 0; height: auto; text-align: left; }
#Bodycontainer {
	display: block; min-width: 0; max-width: 1240px; width: auto; height: auto;
	margin: 0 auto; padding: 24px 16px 0; box-sizing: border-box;
}
#ContentRow {
	position: static; top: 0;
	display: grid; grid-template-columns: 200px minmax(0, 1fr) 220px; gap: 20px; align-items: start;
}
#MenuColumn, #ThemeboxesColumn {
	position: static; width: auto; margin: 0; padding: 0;
	font-family: var(--af-font); font-size: 15px; font-weight: 400; line-height: 1.4; text-align: left;
}
#ContentColumn { margin: 0; min-width: 0; }
#MenuColumn, #ThemeboxesColumn { display: flex; flex-direction: column; gap: 14px; }

a { color: var(--af-gold); }

/* ---------- panels (left and right columns) ---------- */
.af-panel {
	background: var(--af-panel);
	border: 1px solid var(--af-line);
	border-radius: var(--af-radius);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
	color: var(--af-text);
}

/* brand */
#LeftArtwork.af-brand {
	display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px;
	text-decoration: none; color: var(--af-gold);
}
.af-brand-icon { width: 64px; height: 64px; image-rendering: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.af-brand-name { font-family: var(--af-display); font-size: 34px; line-height: 1.05; color: var(--af-gold); text-shadow: 0 2px 0 #4a3510, 0 0 18px rgba(226,179,64,.25); }
.af-brand-tag { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--af-muted); }

/* login */
.af-login { padding: 14px; display: grid; gap: 8px; text-align: center; }
.af-login-status { font-size: 14px; color: var(--af-muted); }
.af-login-link { font-size: 14px; color: var(--af-gold); text-decoration: none; }
.af-login-link:hover { text-decoration: underline; }

/* buttons */
.af-btn {
	display: block; padding: 9px 12px; border-radius: 8px; text-align: center;
	font-family: var(--af-font); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
	transition: transform .08s ease, filter .15s ease;
}
.af-btn:hover { filter: brightness(1.08); text-decoration: none; }
.af-btn:active { transform: translateY(1px); }
.af-btn:focus-visible, .MenuButton:focus-visible, .Submenuitem:focus-visible { outline: 2px solid var(--af-gold); outline-offset: 2px; }
.af-btn-gold { background: linear-gradient(180deg, #f0c85a, var(--af-gold-deep)); color: #22180a; border: 1px solid #8a6512; }
.af-btn-ghost { background: transparent; color: var(--af-text); border: 1px solid var(--af-line); }

/* menu */
.af-menu { padding: 6px; }
.af-menu .menuitem { border-bottom: 1px solid var(--af-line); }
.af-menu .menuitem:last-child { border-bottom: 0; }
.af-menu .MenuButton {
	all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 10px; border-radius: 6px;
	font-family: var(--af-font); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--af-text);
}
.af-menu .MenuButton:hover { background: var(--af-panel-2); }
.af-menu .Label { background: none !important; width: auto; height: auto; position: static; }
.af-menu .Extend { background: none !important; width: 10px; height: 10px; position: static; border-right: 2px solid var(--af-muted); border-bottom: 2px solid var(--af-muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; }
.af-menu .menuitem.is-open .Extend { transform: rotate(225deg) translate(-2px, -2px); border-color: var(--af-gold); }
.af-menu .Submenu { display: none; visibility: visible; padding: 2px 0 8px; }
.af-menu .menuitem.is-open .Submenu { display: block; }
.af-menu .Submenuitem {
	display: block; padding: 6px 10px 6px 16px; border-radius: 6px; border-left: 3px solid transparent;
	font-size: 15px; color: var(--af-text); text-decoration: none; background: none;
}
.af-menu .Submenuitem:hover { background: var(--af-panel-2); color: #fff; }
.af-menu .Submenuitem.is-active { border-left-color: var(--af-gold); color: var(--af-gold); background: rgba(226,179,64,.08); }
.af-menu .SubmenuitemLabel { position: static; width: auto; height: auto; }

/* right column */
#RightArtwork.af-status { position: static; width: auto; height: auto; padding: 16px 14px; text-align: center; }
.af-status-link { color: inherit; text-decoration: none; display: block; }
.af-status-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--af-muted); }
.af-status-value { font-size: 30px; font-weight: 700; color: var(--af-gold); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.af-status-sub { font-size: 13px; color: var(--af-muted); }
.af-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.af-dot-on { background: var(--af-green); box-shadow: 0 0 8px var(--af-green); }
.af-dot-off { background: var(--af-red); }
#Themeboxes { position: static; width: auto; display: flex; flex-direction: column; gap: 14px; }
#Themeboxes div { position: static; }
.af-themebox { padding: 14px; text-align: left; }
.af-themebox p { margin: 6px 0 10px; font-size: 14px; color: var(--af-muted); }
.af-themebox .af-btn + .af-btn { margin-top: 8px; }
.af-themebox-title { font-family: var(--af-display); font-size: 19px; color: var(--af-gold); margin-bottom: 6px; }
.af-top-list { list-style: none; margin: 6px 0 8px; padding: 0; }
.af-top-list li a {
	display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: center;
	padding: 5px 4px; border-bottom: 1px solid var(--af-line); color: var(--af-text); text-decoration: none; font-size: 14px;
}
.af-top-list li a:hover { color: #fff; background: var(--af-panel-2); }
.af-top-rank { color: var(--af-muted); font-variant-numeric: tabular-nums; }
.af-top-level { color: var(--af-gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.af-themebox-more { font-size: 13px; color: var(--af-gold); text-decoration: none; }
.af-muted { color: var(--af-muted); }
.af-gallery img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* ---------- content box ---------- */
.Content { top: 0; }
.Content .Box.af-box {
	margin: 0 0 18px; font-size: 15px; color: var(--af-ink);
	border: 1px solid var(--af-line); border-radius: var(--af-radius); overflow: hidden;
	background: var(--af-paper); box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.af-box-title {
	margin: 0; padding: 14px 20px 12px;
	background: linear-gradient(180deg, var(--af-panel-2), var(--af-panel));
	border-bottom: 2px solid var(--af-gold-deep);
	font-family: var(--af-display); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--af-gold);
	text-wrap: balance;
}
.Content .Border_2, .Content .Border_3 { background: none !important; padding: 0; margin: 0; border: 0; }
.Content .BoxContent {
	background: var(--af-paper) !important; color: var(--af-ink);
	font-family: var(--af-font); font-size: 15px; line-height: 1.55;
	padding: 18px 22px; min-height: 360px;
}
.Content .BoxContent td, .Content .BoxContent p, .Content .BoxContent li { font-family: var(--af-font); font-size: 15px; color: var(--af-ink); }
.Content .BoxContent h2, .Content .BoxContent h3 { font-family: var(--af-font); color: var(--af-ink); }
.Content a, .Content a:visited { font-family: var(--af-font); font-weight: 600; color: var(--af-link); }
.Content a:hover { font-family: var(--af-font); color: var(--af-link-hover); }
.Content th { font-family: var(--af-font); background-color: #26313d; }

/* news headlines (core template uses a red bitmap bar) */
.NewsHeadline { margin: 4px 0 10px; }
.NewsHeadlineBackground {
	background: var(--af-panel) !important; border-radius: 8px; border-left: 4px solid var(--af-gold);
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; height: auto !important; position: relative;
}
.NewsHeadlineIcon { display: none; }
.NewsHeadlineDate, .NewsHeadlineText, .NewsHeadlineAuthor { position: static !important; float: none !important; font-family: var(--af-font) !important; }
.NewsHeadlineDate { color: var(--af-muted) !important; font-size: 13px !important; }
.NewsHeadlineText { color: #fff !important; font-size: 17px !important; font-weight: 700 !important; }
.NewsHeadlineAuthor { color: var(--af-muted) !important; font-size: 13px !important; margin-left: auto; }

/* tables of the core pages */
.TableContainer { border: 1px solid #cfc9bb; border-radius: 8px; overflow: hidden; font-size: 15px; }
.TableContainer .CaptionContainer, .TableContainer .CaptionContainer .CaptionInnerContainer { background: #26313d !important; }
.TableContainer .CaptionContainer .Text { font-family: var(--af-font); font-size: 15px; color: #fff; }
.TableContainer .CaptionContainer [class^="Caption"]:not(.CaptionInnerContainer):not(.CaptionContainer) { background: none !important; }
.TableContainer .Odd { background-color: var(--af-paper); }
.TableContainer .Even { background-color: var(--af-paper-2); }
.TableContainer .TableContent, .Table1, .Table2, .Table3, .Table4, .Table5 { border-color: #cfc9bb !important; }
.TableShadowContainer, .TableShadowContainerRightTop, .TableBottomShadow, .TableBottomLeftShadow, .TableBottomRightShadow, .TableRightShadow { background: none !important; }
.InnerTableContainer { background: transparent; }

/* buttons of the core pages (bitmap buttons -> real buttons) */
.BigButton { background: none !important; width: auto; height: auto; display: inline-block; }
.BigButtonOver { display: none !important; }
.BigButtonText, .Content input[type="submit"], .Content button[type="submit"] {
	position: static; width: auto; height: auto; min-width: 120px; padding: 8px 16px; border-radius: 8px;
	background: linear-gradient(180deg, #f0c85a, var(--af-gold-deep)); color: #22180a; border: 1px solid #8a6512;
	font-family: var(--af-font); font-size: 15px; font-weight: 700; cursor: pointer;
}
.BigButtonText:hover, .Content input[type="submit"]:hover { filter: brightness(1.08); }
.Content input[type="text"], .Content input[type="password"], .Content input[type="email"], .Content select, .Content textarea {
	font-family: var(--af-font); font-size: 15px; padding: 6px 8px; border: 1px solid #bdb6a6; border-radius: 6px; background: #fff; color: var(--af-ink);
}

/* footer */
#Footer { font-family: var(--af-font); font-size: 13px; color: var(--af-muted); padding: 10px 0 30px; }
#Footer a:link, #Footer a:visited { color: var(--af-muted); }

/* ---------- neutralise the old bitmap layout of basic.css ---------- */
#LeftArtwork.af-brand { position: static; top: auto; left: auto; width: auto; height: auto; background: none; }
#Loginbox.af-login { position: static; left: auto; top: auto; width: auto; margin: 0; }
#Menu.af-menu { position: static; left: auto; }
.af-menu .Submenu { position: static; margin: 0; width: auto; background: none; }
.af-menu .Submenuitem { position: relative; margin: 0; }
.af-menu .SubmenuitemLabel { margin: 0; padding: 0; border: 0; overflow: visible; }
.af-menu .Submenu a:link, .af-menu .Submenu a:visited { color: var(--af-text); }
.af-menu .Submenu a.is-active:link, .af-menu .Submenu a.is-active:visited { color: var(--af-gold); }
.af-menu .Submenu a:hover { color: #fff; }
#RightArtwork.af-status { top: auto; left: auto; }

/* forms and boxes of the core pages: no parchment tan */
.TableContentContainer, .TableContainer .Table1, .TableContainer .Table2, .TableContainer .Table3, .TableContainer .Table4, .TableContainer .Table5,
.LabelH, .LabelH td, .Content .BoxContent .Odd, .moduleRowOver { background-color: var(--af-paper-2) !important; }
.Content .BoxContent .Even { background-color: var(--af-paper) !important; }
.TableContainer table.TableContent { border-color: #d6d0c3 !important; background: var(--af-paper); }
.SmallBox .Message, .SmallBox .ErrorMessage { background-color: var(--af-paper-2) !important; }
.BigButtonText, .af-inline-btn { font-size: 15px !important; line-height: 1.2 !important; color: #22180a !important; text-shadow: none !important; }
.af-inline-btn { padding: 6px 14px; border-radius: 8px; border: 1px solid #8a6512; background: linear-gradient(180deg, #f0c85a, var(--af-gold-deep)); font-family: var(--af-font); font-weight: 700; cursor: pointer; }
.MediumButtonBackground, .MediumButtonOver { background: none !important; }

.TableContentAndRightShadow, .TableShadowRightTop, .TableBottomShadow, .TableBottomLeftShadow, .TableBottomRightShadow { background-image: none !important; }
.TableContentContainer, .TableContainer table.TableContent, .InnerTableContainer table { border-color: #d6d0c3 !important; }

/* ---------- mobile ---------- */
.af-mobilebar { display: none; }
@media (max-width: 960px) {
	#Bodycontainer { padding-top: 0; }
	.af-mobilebar {
		display: flex; align-items: center; justify-content: space-between; gap: 10px;
		position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; margin: 0 -16px 14px; padding: 10px 16px;
		background: rgba(13, 18, 24, .95); border-bottom: 1px solid var(--af-line);
	}
	.af-mobilebar-brand { display: flex; align-items: center; gap: 8px; font-family: var(--af-display); font-size: 22px; color: var(--af-gold); text-decoration: none; }
	.af-mobilebar-brand img { width: 32px; height: 32px; }
	.af-mobilebar-toggle { font-family: var(--af-font); font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--af-line); background: var(--af-panel); color: var(--af-text); }
	#ContentRow { grid-template-columns: minmax(0, 1fr); }
	#MenuColumn { display: none; }
	body.nav-open #MenuColumn { display: flex; }
	#MenuColumn #LeftArtwork { display: none; }
	#ContentColumn { order: 2; }
	#MenuColumn { order: 1; }
	#ThemeboxesColumn { order: 3; }
	.Content .BoxContent { padding: 14px 14px; min-height: 0; overflow-x: auto; }
	.af-box-title { font-size: 22px; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.af-btn, .af-menu .Extend { transition: none; }
}
