/* 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; }
}

/* Rankings box (boxes/rankings.php): tabs with top-5 lists */
.af-rank-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
.af-rank-tab { flex: 1 1 auto; padding: 4px 6px; font-size: 12px; font-family: inherit; color: var(--af-muted); background: var(--af-panel-2); border: 1px solid transparent; border-radius: 3px; cursor: pointer; }
.af-rank-tab:hover { color: #fff; }
.af-rank-tab.is-on { color: var(--af-gold); border-color: var(--af-gold); }
.af-rank-pane { display: none; }
.af-rank-pane.is-on { display: block; }
.af-rank-note { font-size: 11px; color: var(--af-muted); margin: 0 0 2px; }

/* Language switcher PL | EN (i18n.php af_lang_switcher): under the logo, in the mobile bar on phones */
.af-lang { display: flex; justify-content: center; align-items: center; gap: 4px; font-family: var(--af-font); font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1; }
.af-lang a { color: var(--af-muted); text-decoration: none; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; }
.af-lang a:hover { color: #fff; }
.af-lang a.is-on { color: var(--af-gold); border-color: var(--af-gold-deep); }
.af-lang-sep { color: var(--af-line); }
.af-lang-side { margin-top: -6px; }
.af-lang-bar { display: none; }
@media (max-width: 960px) {
	.af-lang-side { display: none; }
	.af-lang-bar { display: flex; margin-left: auto; }
	.af-lang-bar a { padding: 8px 10px; font-size: 14px; }
}

/* ==== afa:begin (account panel + login box, myaac/account-mobile) ==== */
/* ---------- left login box: buttons never wider than the box (2026-10-07) ----------
   The box is a grid with one implicit "auto" column; the Google button (white-space: nowrap) made that
   column wider than the 200 px sidebar, so both buttons stuck out. One shrinkable column + wrapping text. */
#Loginbox.af-login { grid-template-columns: minmax(0, 1fr); min-width: 0; box-sizing: border-box; }
#Loginbox.af-login > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
#Loginbox.af-login .gsi-btn { width: 100%; max-width: 100%; min-width: 0; height: auto; min-height: 40px; padding: 6px 10px; white-space: normal; text-align: center; line-height: 1.25; }
#Loginbox.af-login .gsi-text { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
#Themeboxes > *, #ThemeboxesColumn > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.af-themebox .af-btn { box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere; }

/* ---------- Account Management + its forms (templates/ardenfall/account.*.html.twig, 2026-10-07) ----------
   Mobile first: one column, big touch targets (>= 44 px); tables become cards below 600 px. */
.afa-manage, .afa { font-size: 15px; line-height: 1.45; color: var(--af-ink); }
.afa { max-width: 560px; margin: 0 auto; }
.afa-intro { margin: 0 0 14px !important; color: var(--af-ink-soft); }
.afa-intro b { color: var(--af-ink); }
.afa-warn { color: #a3261b !important; font-weight: 600; }

.afa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 14px; background: var(--af-panel); color: var(--af-text); border-radius: 12px; border: 1px solid var(--af-line); }
.afa-hello { font-family: var(--af-display); font-size: 21px; line-height: 1.2; color: var(--af-gold); }
.afa-head-sub { font-size: 14px; color: var(--af-muted); margin-top: 2px; }
.afa-head-sub b { color: var(--af-text); letter-spacing: .04em; }
.afa-head form { margin: 0; }

.afa-note { background: #fff6dd; border: 1px solid #ecd9a2; border-left: 4px solid var(--af-gold); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.afa-note p { margin: 0 0 10px !important; }
.afa-note-warn { background: #fdf0ec; border-color: #f0c9bd; border-left-color: #c0573f; }
.afa-note form { margin: 0; }

.afa-sec { border: 1px solid #cfc9bb; border-radius: 10px; overflow: hidden; margin: 0 0 18px; background: var(--af-paper); }
.afa-sec-title { margin: 0 !important; padding: 9px 14px; background: #26313d; color: #fff !important; font-family: var(--af-font) !important; font-size: 15px !important; font-weight: 700; letter-spacing: .02em; }
.afa-sec-body { padding: 4px 0; }
.afa-sec-foot { padding: 10px 12px 12px; border-top: 1px solid #ddd6c8; background: var(--af-paper); }

.afa-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2px 14px; align-items: start; padding: 8px 14px; }
.afa-row:nth-child(odd) { background: var(--af-paper-2); }
.afa-k { font-weight: 700; color: var(--af-ink); }
.afa-v { min-width: 0; overflow-wrap: anywhere; }
.afa-v form { margin: 0; }
.afa-big { font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.afa-hint { font-size: 13px !important; color: #555 !important; margin: 6px 0 0 !important; line-height: 1.4; }
.afa-on { color: #1e7a4c; font-weight: 700; }
.afa-off { color: #8a8a8a; font-weight: 700; }
.afa-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

/* buttons (the core gold style; .Content prefix beats the generic submit style) */
.afa-btn, .Content .afa-btn, .Content button.afa-btn, .Content a.afa-btn {
	display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
	min-width: 0; min-height: 44px; padding: 8px 16px; margin: 0; border-radius: 10px; cursor: pointer;
	font-family: var(--af-font); font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none !important;
	background: linear-gradient(180deg, #f0c85a, var(--af-gold-deep)); color: #22180a !important; border: 1px solid #8a6512;
	-webkit-tap-highlight-color: transparent;
}
.afa-btn:hover { filter: brightness(1.06); }
.afa-btn:focus-visible { outline: 3px solid rgba(226,179,64,.6); outline-offset: 2px; }
.Content .afa-btn-ghost, .Content button.afa-btn-ghost, .Content a.afa-btn-ghost { background: #fff; color: #5c4210 !important; border: 1px solid var(--af-gold-deep); }
.Content .afa-btn-ghost:hover { background: #fff6dd; filter: none; }
.Content .afa-btn-dark, .Content a.afa-btn-dark { background: #5f4d41; color: #fff !important; border-color: #4a3b31; }
.Content .afa-btn-danger, .Content button.afa-btn-danger, .Content a.afa-btn-danger { background: #fff; color: #a3261b !important; border: 1px solid #d38b80; }
.Content .afa-btn-danger:hover { background: #fdecea; filter: none; }
.Content .afa-btn-small, .Content button.afa-btn-small, .Content a.afa-btn-small { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.Content .afa-head button.afa-btn-ghost { background: transparent; color: var(--af-text) !important; border-color: #4a5b6e; }
.Content .afa-head button.afa-btn-ghost:hover { background: var(--af-panel-2); }
.afa .afs-field > label.afs-check { display: flex; font-weight: 400; margin: 0; }

.afa-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.afa-actions > form { margin: 0; display: flex; }
.afa-actions > form > .afa-btn, .afa-actions > .afa-btn { flex: 1 1 auto; }
.afa-actions .afa-push { margin-left: auto; }
.afa-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.afa-form-actions > .afa-btn { flex: 1 1 160px; min-height: 50px; font-size: 16px; }

/* form fields (the registration look, signup.css .afs-*) */
.afa-panel { background: #fff; border: 1px solid #d6cfc2; border-radius: 12px; padding: 16px 16px 4px; margin: 0 0 6px; }
.afa-panel-title { margin: 0 0 12px !important; font-family: var(--af-font) !important; font-size: 17px !important; font-weight: 700; color: var(--af-ink) !important; }
.afa .afs-field select, .afa .afs-field textarea, .afa select.afa-input, .afa textarea {
	display: block; width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px; margin: 0;
	font-family: var(--af-font); font-size: 16px; color: #1f252c; background: #fff; border: 1px solid #bdb5a6; border-radius: 10px;
}
.afa textarea { min-height: 160px; resize: vertical; line-height: 1.4; }
.afa select:focus, .afa textarea:focus { outline: none; border-color: var(--af-gold-deep); box-shadow: 0 0 0 3px rgba(226,179,64,.35); }
.afa-static { font-size: 17px; font-weight: 700; padding: 2px 0; overflow-wrap: anywhere; }
.afa-namecheck { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; }
.afa-namecheck img { flex: 0 0 auto; }
.afa-namecheck #character_error { min-width: 0; }
.afa-radios { display: grid; gap: 8px; }
.afa-radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid #d6cfc2; border-radius: 10px; background: #fff; cursor: pointer; }
.afa-radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--af-gold-deep); }
.afa .afs-check { margin-bottom: 12px; }

/* tables: account logs, characters */
.afa-table { width: 100%; border-collapse: collapse; }
.afa-table th { text-align: left; padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--af-ink); background: var(--af-paper-2); border-bottom: 1px solid #ddd6c8; }
.afa-table td { padding: 8px 12px; vertical-align: middle; border-bottom: 1px solid #e6e0d4; }
.afa-table tr:last-child td { border-bottom: 0; }
.afa-table tbody tr:nth-child(even) td { background: var(--af-paper-2); }
.afa-nowrap { white-space: nowrap; }
.afa-num { color: var(--af-ink-soft); font-variant-numeric: tabular-nums; }
.afa-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.6; }
.afa-badge-on { background: #e3f4ea; color: #1e7a4c; }
.afa-badge-off { background: #f1eee8; color: #6b6458; }
.afa-badge-del { background: #fdecea; color: #a3261b; }
.afa-char-name { font-weight: 700; overflow-wrap: anywhere; }
.afa-char-name a { font-weight: 700; }
.afa-muted { color: var(--af-ink-soft); font-size: 14px; }
.afa-ip { font-variant-numeric: tabular-nums; color: var(--af-ink-soft); }

/* success page (success.html.twig) and its custom buttons from core pages */
.afa-result { background: #fff; border: 1px solid #d6cfc2; border-left: 4px solid var(--af-green); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; overflow-wrap: anywhere; }
.afa-result-title { margin: 0 0 6px !important; font-family: var(--af-font) !important; font-size: 18px !important; font-weight: 700; color: var(--af-ink) !important; }
.afa-custom table, .afa-custom tbody, .afa-custom tr { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100% !important; }
.afa-custom td { display: block; border: 0 !important; }
.afa-custom td:empty, .afa-custom td[width="30"] { display: none; }
.afa-custom form { margin: 0; }

/* Google row (afg_manage_row() markup from system/ardenfall-google.php) */
.afa-row .afg-manage-actions { margin-left: 0; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.Content .afa-row .afg-small, .Content .afa-row .afg-manage button.afg-small { min-height: 38px; box-sizing: border-box; line-height: 1.2; padding: 6px 12px; border-radius: 8px; font-size: 14px; display: inline-flex; align-items: center; }
.afa-row .afg-manage .gsi-btn { max-width: 100%; white-space: normal; height: auto; min-height: 40px; }

@media (max-width: 600px) {
	.afa-head { padding: 12px; }
	.afa-hello { font-size: 19px; }
	.afa-head > form { width: 100%; }
	.Content .afa-head button.afa-btn { width: 100%; }
	.afa-row { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
	.afa-k { font-size: 13px; font-weight: 700; color: var(--af-ink-soft); text-transform: uppercase; letter-spacing: .04em; }
	.afa-v { font-size: 16px; }
	.afa-actions > form, .afa-actions > .afa-btn { flex: 1 1 calc(50% - 5px); }
	.afa-actions > form > .afa-btn { width: 100%; }
	.afa-actions .afa-push { margin-left: 0; }
	.afa-inline .afa-btn { flex: 1 1 auto; }
	/* tables -> cards */
	.afa-table thead { display: none; }
	.afa-table, .afa-table tbody { display: block; }
	.afa-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #e6e0d4; }
	.afa-table tbody tr:nth-child(even) { background: var(--af-paper-2); }
	.afa-table td { display: block; padding: 0; border: 0 !important; background: none !important; min-width: 0; }
	.afa-table .afa-c-main { grid-column: 1 / -1; }
	.afa-table .afa-c-full { grid-column: 1 / -1; }
	.afa-table .afa-c-right { justify-self: end; text-align: right; }
	.afa-chars .afa-c-act { grid-column: 1 / -1; margin-top: 6px; }
	.afa-chars .afa-c-act .afa-btn { width: 100%; }
	.afa-log .afa-c-date, .afa-log .afa-c-ip { font-size: 13.5px; color: var(--af-ink-soft); }
	.afa-nowrap { white-space: normal; }
	.afa-form-actions > .afa-btn { flex: 1 1 100%; }
	.afa-panel { padding: 14px 12px 2px; }
}

/* Invite a Friend (system/pages/recruit.php): name field + Save in one row that wraps, 44 px targets */
.Content form[action$="/recruit"] { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.Content form[action$="/recruit"] input[name="referrer"] { flex: 1 1 200px; min-width: 0; min-height: 44px; box-sizing: border-box; font-size: 16px; border-radius: 10px; padding: 8px 12px; }
.Content form[action$="/recruit"] input[type="submit"] { flex: 0 0 auto; min-height: 44px; border-radius: 10px; }
.Content .rec-table td, .Content .rec-table th { overflow-wrap: anywhere; }
/* ==== afa:end ==== */

/* world switch (Klasyczna 7.60 | Ardenfall 15): one line; short "7.60 | 15" in the phone bar */
.af-world a { white-space: nowrap; }
.af-mobilebar .af-lang { gap: 2px; font-size: 12px; letter-spacing: .03em; }
.af-mobilebar .af-lang a { padding: 4px 5px; }
.af-mobilebar .af-world a.is-on { background: rgba(226, 179, 64, .12); }
@media (max-width: 520px) {
	/* narrow phones: the icon alone as the brand, so the world switch, PL | EN and Menu fit in one row */
	.af-mobilebar { gap: 6px; }
	.af-mobilebar-brand { font-size: 0; gap: 0; }
	.af-mobilebar-toggle { padding: 8px 10px; font-size: 14px; }
}
