/*
 * TrutzBox theme — main stylesheet.
 *
 * Strategy: import prosilver's full chain first, then layer the TrutzBox
 * design tokens (colours.css) and overrides on top. Browsers resolve
 * @import URLs relative to the importing file, which is why the chain is
 * threaded here in the child theme (phpBB's parent inheritance is at the
 * template level, not the URL level).
 *
 * @import order matters: later wins for cascade ties.
 *
 * Design source: api.anthropic.com/v1/design/h/IaMXj--HzPWbr6ITZTnbOw
 *  → Support-Forum.html (TrutzBox forum index reimagining).
 *
 * The forum keeps prosilver's underlying DOM (`<dl class="row-item">` and
 * its `<dt>`/`<dd>` columns). This file restyles that DOM to look like the
 * design's `<li class="forum-row">` cards. Anything in the design that
 * needs *new markup* (status banner, sidebar stats/online/legend cards,
 * verified-author badges, "Offiziell" / "Ohne Support" chips) is out of
 * scope for a style-only change and would need a template fork.
 */
@import url("../../prosilver/theme/stylesheet.css");
@import url("colours.css");

/* === Base ============================================================ */

html, body {
	background-color: var(--tb-bg);
	color: var(--tb-fg1);
	font-family: var(--tb-font-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Strip prosilver's blue palette from headings, panels, and inline
 * accents. prosilver has a saturated phpBB-blue (#115098 / #28313F /
 * #536482 / #368AD2) sprinkled across `.content h2`, `.panel h2`,
 * inline separators, friend-list mini-cards, etc. — those leak through
 * on auxiliary pages (login, register, FAQ, UCP) and visually clash
 * with TrutzBox red. Reset to neutral fg tones using TrutzBox tokens. */
h1, h2, h3, h4, h5, h6,
.content h1, .content h2, .content h3,
.panel h1, .panel h2, .panel h3,
.panel-container h1, .panel-container h2, .panel-container h3 {
	color: var(--tb-fg1);
	border-bottom-color: var(--tb-divider);
}
.content,
.content p,
.postbody {
	color: var(--tb-fg1);
}
/* prosilver wraps every UCP/login/register/error page in a `.panel`
 * with `background-color: #ECF1F3; color: #28313F;` (light blue tint
 * + dark blue text). Reframe it as a TrutzBox card so the auxiliary
 * pages match the index visually. The `.bg1` / `.bg2` zebra tints
 * (#ECF3F7 / #E1EBF2) on tables and post lists also leak blue —
 * swap them for the neutral canvas + paper. */
.panel {
	background-color: var(--tb-paper);
	color: var(--tb-fg1);
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius-md);
	box-shadow: var(--tb-shadow-1);
}
.panel + .panel { margin-top: 12px; }
.cp-mini,
.panel-container .panel {
	background-color: var(--tb-paper);
}
.bg1 {
	background-color: var(--tb-bg);
}
.bg2 {
	background-color: var(--tb-paper);
}
table.zebra-list tr:nth-child(odd) td,
ul.zebra-list li:nth-child(odd) {
	background-color: var(--tb-bg);
}

/* Form labels (`<dt>` inside fieldset.fields1 / fields2) use the same
 * `#536482` blue-gray as prosilver's body text. We've already redirected
 * `body` to fg1, but the dt rule has its own color declaration that
 * wins — re-anchor it. */
fieldset.fields1 dt,
fieldset.fields2 dt,
fieldset dl > dt,
fieldset dl > dt label,
dl.details dt,
dl.faq dt {
	color: var(--tb-fg1);
}
fieldset.fields1,
fieldset.fields2 {
	color: var(--tb-fg1);
}
dl.mini dt,
table.table1 td,
dl.details dd,
.sep {
	color: var(--tb-fg2);
}
/* The "icon-bluegray" / "icon-blue" / "icon-lightgray" tone variants
 * land on tons of FA glyphs across phpBB. Map them all into the muted
 * TrutzBox palette so the index/forum pages don't get blue accents. */
.icon.icon-blue,
.icon.icon-bluegray,
.icon.icon-lightgray,
a:hover .icon.icon-blue,
a:hover .icon.icon-bluegray,
a:hover .icon.icon-lightgray {
	color: var(--tb-fg2);
}
.icon.icon-red,
a:hover .icon.icon-red {
	color: var(--tb-red);
}
.posthilit {
	background-color: var(--tb-red-tint);
	color: var(--tb-red-dark);
}

code, kbd, pre, samp, tt, .codebox code {
	font-family: var(--tb-font-mono);
}

/* === Links =========================================================== */

a, a:link, a:visited {
	color: var(--tb-red);
	text-decoration: none;
}
a:hover {
	color: var(--tb-red-dark);
	text-decoration: none;
}

a.forumtitle, a.topictitle {
	color: var(--tb-fg1);
	font-weight: 600;
	letter-spacing: -0.005em;
}
a.forumtitle:hover, a.topictitle:hover {
	color: var(--tb-red);
}

/* === Page chrome / header ============================================
 *
 * The design's app bar is a low-profile white sticky strip with a thin
 * bottom divider (no red stripe), a small brand mark + wordmark on the
 * left, and primary CTAs on the right. phpBB's `.headerbar` carries the
 * site logo + description, so we restyle it as the design's app bar
 * surface.
 */
#wrap {
	background-color: var(--tb-bg);
}

.headerbar {
	background-color: var(--tb-paper) !important;
	background-image: none !important;
	color: var(--tb-fg1);
	border-bottom: 1px solid var(--tb-divider);
	box-shadow: var(--tb-shadow-appbar);
	padding: 14px 24px 12px;
}

.headerbar a, .headerbar a:hover, .headerbar h1, .headerbar h1 a {
	color: var(--tb-fg1);
}

#site-description h1,
.headerbar #site-description h1,
.headerbar #site-description h1 a {
	color: var(--tb-fg1);
	font-weight: 700;
	letter-spacing: -0.01em;
}

#site-description p,
.headerbar #site-description .site-description {
	color: var(--tb-fg2);
	font-size: 13px;
	letter-spacing: 0.4px;
}

/*
 * Logo — site_logo.png is 567×158 (aspect ~3.59:1). Display at 215×60 to
 * give it presence in the header without dwarfing the site description.
 * To swap, replace styles/trutzbox/theme/images/site_logo.png and adjust
 * the dimensions here if the new asset has a different aspect ratio.
 */
.site_logo,
#logo .site_logo {
	background-image: url("./images/site_logo.png");
	background-repeat: no-repeat;
	background-position: left center;
	background-size: contain;
	width: 215px;
	height: 60px;
	display: inline-block;
}
a#logo, #logo {
	background-color: transparent;
	display: inline-block;
}

/* === Search box (header) =============================================
 *
 * Mirrors the design's `.search` widget: pill-rounded with the red focus
 * ring on focus-within. phpBB's header search is a small inline form;
 * we restyle it without changing the markup.
 */
.search-header {
	background-color: var(--tb-bg);
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius);
	padding: 0 8px;
	transition: border-color var(--tb-dur-base) var(--tb-ease),
	            box-shadow var(--tb-dur-base) var(--tb-ease);
}
.search-header:focus-within {
	border-color: var(--tb-red);
	box-shadow: 0 0 0 3px var(--tb-red-tint);
	background-color: var(--tb-paper);
}

/* === Navbar / breadcrumbs ============================================ */

.navbar {
	background-color: var(--tb-paper);
	background-image: none;
	border-bottom: 1px solid var(--tb-divider);
}

.navbar .nav-main a,
.navbar .nav-breadcrumbs a {
	color: var(--tb-fg2);
	font-size: 13px;
}
.navbar .nav-main a:hover,
.navbar .nav-breadcrumbs a:hover {
	color: var(--tb-red);
}

.linklist li a.lastsubject {
	color: var(--tb-fg1);
}

.action-bar {
	background-color: transparent;
	border: 0;
}

/* === Forum group (forabg) as a card ==================================
 *
 * Design: rounded white card with a 1px divider, soft shadow, and a left
 * red accent bar inside the group header. prosilver's `.forabg` already
 * wraps each forum group; we just reframe it.
 */
.forumbg, .forabg {
	background-color: var(--tb-paper);
	background-image: none;
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius-md);
	box-shadow: var(--tb-shadow-1);
	overflow: hidden;
	margin-bottom: 16px;
}

.forumbg .inner, .forabg .inner {
	background: transparent;
	border: 0;
	padding: 0;
}

/* Group header row (the "Forum / Topics / Posts / Last post" strip).
 * Replaced with the design's compact uppercase header that has a red
 * accent bar on the left. */
.forumbg .header,
.forabg .header,
ul.topiclist li.header {
	background: linear-gradient(180deg, #FCFCFC 0%, var(--tb-paper) 100%);
	background-color: var(--tb-paper);
	background-image: none, linear-gradient(180deg, #FCFCFC 0%, var(--tb-paper) 100%);
	color: var(--tb-fg2);
	border-bottom: 1px solid var(--tb-divider);
	border-top: 0;
}
ul.topiclist li.header dt,
ul.topiclist li.header dd {
	background-color: transparent;
	background-image: none;
	color: var(--tb-fg2);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding-top: 8px;
	padding-bottom: 8px;
}
ul.topiclist li.header dt {
	position: relative;
}
ul.topiclist li.header dt .list-inner {
	padding-left: 26px;
}
/* Red accent bar on the left of the group header. The design's
 * `.group-bar` is a 3×14px red stripe before the group title. */
ul.topiclist li.header dt::before {
	content: "";
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 14px;
	background-color: var(--tb-red);
	border-radius: 2px;
}
ul.topiclist li.header a {
	color: var(--tb-fg1);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.4px;
}

/* === Forum row =======================================================
 *
 * Tighten padding, switch row hover from prosilver's red tint to the
 * subtle neutral hover used in admin-ui (rgba(0,0,0,0.04)). Keep the
 * divider between rows soft so the card frame stays the dominant edge.
 */
ul.topiclist li.row {
	background-color: var(--tb-paper);
	border-color: var(--tb-divider-soft);
	border-top: 1px solid var(--tb-divider-soft);
	transition: background-color var(--tb-dur-base) var(--tb-ease);
}
ul.topiclist.forums li.row:first-child,
ul.topiclist.forums > li.row:first-child {
	border-top: 0;
}
ul.topiclist li.row:hover {
	background-color: var(--tb-hover);
}

dl.row-item {
	min-height: 56px;
}
dl.row-item dt {
	color: var(--tb-fg1);
}
/* `.list-inner` is the catch-all for everything in the title cell:
 * the forumtitle anchor, then a `<br />`, then the bare description
 * text node. Style the cell as the description (muted, smaller) and
 * lift the forumtitle back up to body weight; the bare-text-node
 * description picks up the cell defaults. */
dl.row-item dt .list-inner {
	color: var(--tb-fg2);
	padding-left: 56px;
	font-size: 12.5px;
	line-height: 1.4;
}
dl.row-item dt .list-inner a.forumtitle {
	color: var(--tb-fg1);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.3;
}
dl.row-item dt .list-inner a.forumtitle:hover {
	color: var(--tb-red);
}

/* === Forum row icon (rounded square container) =======================
 *
 * Override prosilver's bitmap forum_read.gif / forum_unread.gif with our
 * SVGs. Each SVG renders the design's rounded-square container plus a
 * folder glyph in the right tone (red for unread, neutral for read) and
 * an unread dot in the upper-right for unread variants. Keep the
 * background-position from prosilver's content.css (10px 50%) so the
 * icon stays vertically centered as the row grows.
 */
dl.row-item {
	background-position: 12px 50%;
	background-repeat: no-repeat;
	background-size: 32px 32px;
}
.forum_read				{ background-image: url("./images/forum_read.svg"); }
.forum_read_locked			{ background-image: url("./images/forum_read_locked.svg"); }
.forum_read_subforum			{ background-image: url("./images/forum_read_subforum.svg"); }
.forum_unread				{ background-image: url("./images/forum_unread.svg"); }
.forum_unread_locked			{ background-image: url("./images/forum_unread_locked.svg"); }
.forum_unread_subforum			{ background-image: url("./images/forum_unread_subforum.svg"); }

/* === Topic row icons (viewforum) =====================================
 *
 * prosilver's topic icons are tiny .gifs (e.g. topic_read.gif) that
 * render as a circular outline + paper glyph at 32px — a hangover from
 * the original 2008 prosilver. Override with the same 32×32 rounded-
 * square SVGs we use for forum rows so viewforum visually matches the
 * index. Three glyph families:
 *   topic_*    — page (regular thread)
 *   announce_* — megaphone (board announcement)
 *   sticky_*   — pin (pinned thread)
 * The `_mine` / `_hot` variants reuse the same base SVG — phpBB has no
 * distinct visual treatment for "I posted in this" or "popular" beyond
 * the unread/read distinction the user already cares about.
 */
.topic_read,
.topic_read_mine,
.topic_read_hot,
.topic_read_hot_mine             { background-image: url("./images/topic_read.svg"); }
.topic_read_locked,
.topic_read_locked_mine          { background-image: url("./images/topic_read_locked.svg"); }
.topic_unread,
.topic_unread_mine,
.topic_unread_hot,
.topic_unread_hot_mine           { background-image: url("./images/topic_unread.svg"); }
.topic_unread_locked,
.topic_unread_locked_mine        { background-image: url("./images/topic_unread_locked.svg"); }

.announce_read,
.announce_read_mine,
.global_read,
.global_read_mine                { background-image: url("./images/announce_read.svg"); }
.announce_read_locked,
.announce_read_locked_mine,
.global_read_locked,
.global_read_locked_mine         { background-image: url("./images/announce_read_locked.svg"); }
.announce_unread,
.announce_unread_mine,
.global_unread,
.global_unread_mine              { background-image: url("./images/announce_unread.svg"); }
.announce_unread_locked,
.announce_unread_locked_mine,
.global_unread_locked,
.global_unread_locked_mine       { background-image: url("./images/announce_unread_locked.svg"); }

.sticky_read,
.sticky_read_mine                { background-image: url("./images/sticky_read.svg"); }
.sticky_read_locked,
.sticky_read_locked_mine         { background-image: url("./images/sticky_read_locked.svg"); }
.sticky_unread,
.sticky_unread_mine              { background-image: url("./images/sticky_unread.svg"); }
.sticky_unread_locked,
.sticky_unread_locked_mine       { background-image: url("./images/sticky_unread_locked.svg"); }

/* === Stat columns (topics / posts) =================================== */

ul.topiclist dd.topics,
ul.topiclist dd.posts,
ul.topiclist dd.views {
	color: var(--tb-fg1);
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	line-height: 1.1;
	padding-top: 12px;
}
ul.topiclist dfn {
	color: var(--tb-fg2);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

/* === Last-post column ================================================
 *
 * Design has a two-line layout: title (bold, truncated) + author (with
 * a small red verified mark) + date below. prosilver puts everything
 * inside one <dd class="lastpost"><span> with `<br>` separators. We
 * lean on the existing line breaks but tighten the typography.
 */
ul.topiclist dd.lastpost {
	font-size: 12px;
	color: var(--tb-fg2);
	line-height: 1.4;
	padding-top: 10px;
}
ul.topiclist dd.lastpost > span {
	padding-left: 8px;
}
ul.topiclist dd.lastpost a.lastsubject {
	display: block;
	color: var(--tb-fg1);
	font-size: 12.5px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 2px;
	line-height: 1.3;
}
ul.topiclist dd.lastpost a.lastsubject:hover {
	color: var(--tb-red);
}
ul.topiclist dd.lastpost time {
	color: var(--tb-fg2);
	font-size: 11.5px;
}

/* === Posts (viewtopic) =============================================== */

.post.bg1 { background-color: var(--tb-paper); }
.post.bg2 { background-color: var(--tb-bg); }
.post.bg3,
.post.unreadpost {
	background-color: var(--tb-red-tint);
}
.post {
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius-md);
	box-shadow: var(--tb-shadow-1);
	margin-bottom: 12px;
}

.postbody {
	color: var(--tb-fg1);
}
.author, .author a {
	color: var(--tb-fg2);
}
.username, .username-coloured {
	color: var(--tb-red);
	font-weight: 600;
}

/* === Buttons =========================================================
 *
 * Rounded 8px radius. Default = paper with hairline border. Primary
 * (default-submit-action) = red with subtle drop shadow that lifts on
 * hover, matching the design's `.btn-primary`.
 */
.button,
input.button1, input.button2, input.button3,
button.button1, button.button2, button.button3 {
	background-color: var(--tb-paper);
	background-image: none;
	border: 1px solid var(--tb-divider);
	color: var(--tb-fg1);
	border-radius: var(--tb-radius);
	font-weight: 500;
	padding: 7px 13px;
	transition: background-color var(--tb-dur-base) var(--tb-ease),
	            border-color var(--tb-dur-base) var(--tb-ease),
	            box-shadow var(--tb-dur-base) var(--tb-ease),
	            color var(--tb-dur-base) var(--tb-ease);
}

.button:hover,
input.button1:hover, input.button2:hover, input.button3:hover,
button.button1:hover, button.button2:hover, button.button3:hover {
	background-color: var(--tb-hover);
	border-color: rgba(0, 0, 0, 0.2);
	color: var(--tb-fg1);
}

.button.button-primary,
input[type="submit"].default-submit-action,
button.button1.default-submit-action {
	background-color: var(--tb-red);
	background-image: none;
	border-color: var(--tb-red);
	color: #FFFFFF;
	box-shadow: var(--tb-shadow-btn);
}
.button.button-primary:hover,
input[type="submit"].default-submit-action:hover,
button.button1.default-submit-action:hover {
	background-color: var(--tb-red-dark);
	border-color: var(--tb-red-dark);
	color: #FFFFFF;
	box-shadow: var(--tb-shadow-btn-hover);
}

/* === Forms =========================================================== */

input.inputbox, textarea.inputbox, select.inputbox,
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], textarea, select {
	background-color: var(--tb-paper);
	border: 1px solid var(--tb-divider);
	color: var(--tb-fg1);
	border-radius: var(--tb-radius);
	padding: 6px 10px;
	transition: border-color var(--tb-dur-base) var(--tb-ease),
	            box-shadow var(--tb-dur-base) var(--tb-ease);
}
input.inputbox:focus, textarea.inputbox:focus, select.inputbox:focus,
input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, input[type="search"]:focus,
textarea:focus, select:focus {
	border-color: var(--tb-red);
	box-shadow: 0 0 0 3px var(--tb-red-tint);
	outline: none;
}

/* === Tabs ============================================================ */

#tabs {
	border-bottom: 1px solid var(--tb-divider);
}
#tabs a {
	background-color: var(--tb-paper);
	background-image: none;
	border: 1px solid var(--tb-divider);
	border-bottom: 0;
	color: var(--tb-fg2);
	border-radius: var(--tb-radius) var(--tb-radius) 0 0;
	padding: 8px 14px;
	font-weight: 500;
}
#tabs a:hover {
	background-color: var(--tb-hover);
	color: var(--tb-fg1);
}
#tabs .activetab a,
#tabs .activetab a:hover {
	background-color: var(--tb-red-tint);
	border-color: var(--tb-divider);
	color: var(--tb-red);
}

/* === Pagination ====================================================== */

.pagination li a, .pagination li span {
	background-color: var(--tb-paper);
	background-image: none;
	border: 1px solid var(--tb-divider);
	color: var(--tb-fg1);
	border-radius: var(--tb-radius);
	padding: 4px 10px;
	transition: background-color var(--tb-dur-base) var(--tb-ease),
	            border-color var(--tb-dur-base) var(--tb-ease),
	            color var(--tb-dur-base) var(--tb-ease);
}
.pagination li a:hover {
	background-color: var(--tb-red-tint);
	border-color: var(--tb-red-tint-12);
	color: var(--tb-red-dark);
}
.pagination li.active span {
	background-color: var(--tb-red);
	border-color: var(--tb-red);
	color: #FFFFFF;
	font-weight: 600;
}

/* === Status messages ================================================= */

.error, p.error	{ color: var(--tb-error); }
.success	{ color: var(--tb-success); }
.warning	{ color: var(--tb-warning); }

/* === Footer ==========================================================
 *
 * Design's footer is a 4-column grid on a white surface, capped by a
 * thin "© 2026 Comidio GmbH" bottom strip. phpBB's `#page-footer` is
 * a single block; we restyle without restructuring.
 */
#page-footer {
	background-color: var(--tb-paper);
	color: var(--tb-fg2);
	border-top: 1px solid var(--tb-divider);
	margin-top: 24px;
	padding: 18px 24px;
}
#page-footer a {
	color: var(--tb-red);
}
#page-footer a:hover {
	color: var(--tb-red-dark);
}

/* ========================================================================
 * TrutzBox custom chrome (template fork required)
 *
 * The selectors below target markup we *added* in the trutzbox template
 * fork (overall_header.html / index_body.html / forumlist_body.html). All
 * such selectors are prefixed `.tb-` so they don't collide with prosilver
 * or with any third-party MOD that piggybacks on phpBB classnames.
 * ======================================================================== */

/* === App bar ========================================================= */

.tb-appbar {
	background-color: var(--tb-paper);
	border-bottom: 1px solid var(--tb-divider);
	box-shadow: var(--tb-shadow-appbar);
}
.tb-appbar-inner {
	max-width: 1280px;
	margin: 0 auto;
	height: 60px;
	padding: 0 24px;
	display: flex;
	align-items: center;
	gap: 20px;
}
.tb-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--tb-fg1);
	text-decoration: none;
}
.tb-brand:hover { color: var(--tb-fg1); text-decoration: none; }
/* Use site_logo.png at its native aspect (3.59:1) so the full TrutzBox
 * wordmark reads. 132×37 keeps the appbar at 60px tall while giving the
 * logo enough presence to register as the page identity, not an
 * afterthought. Bump these together if you swap in a different logo
 * asset. */
.tb-brand-mark {
	width: 132px;
	height: 37px;
	background: url("./images/site_logo.png") left center / contain no-repeat;
	flex-shrink: 0;
}
.tb-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1;
	padding-left: 2px;
	border-left: 1px solid var(--tb-divider);
	margin-left: 4px;
	padding-left: 12px;
	height: 24px;
	justify-content: center;
}
.tb-brand-tagline {
	font-size: 11px;
	color: var(--tb-fg2);
	text-transform: uppercase;
	letter-spacing: 1.2px;
	font-weight: 600;
}
.tb-topnav {
	display: flex;
	gap: 4px;
	margin-left: 8px;
}
.tb-topnav-link {
	padding: 8px 14px;
	border-radius: var(--tb-radius);
	color: var(--tb-fg2);
	font-weight: 500;
	font-size: 14px;
	text-decoration: none;
	transition: background-color var(--tb-dur-base) var(--tb-ease),
	            color var(--tb-dur-base) var(--tb-ease);
}
.tb-topnav-link:hover {
	background-color: var(--tb-hover);
	color: var(--tb-fg1);
	text-decoration: none;
}
.tb-topnav-link.is-active {
	background-color: var(--tb-red-tint);
	color: var(--tb-red);
}
.tb-topnav-link.is-active:hover { color: var(--tb-red-dark); }

.tb-appbar-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}
.tb-search {
	display: flex;
	align-items: center;
	gap: 8px;
	background-color: var(--tb-bg);
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius);
	padding: 0 10px;
	height: 36px;
	width: 280px;
	transition: border-color var(--tb-dur-base) var(--tb-ease),
	            box-shadow var(--tb-dur-base) var(--tb-ease);
}
.tb-search:focus-within {
	border-color: var(--tb-red);
	box-shadow: 0 0 0 3px var(--tb-red-tint);
	background-color: var(--tb-paper);
}
.tb-search > .icon { color: var(--tb-fg2); }
.tb-search input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	color: var(--tb-fg1);
	font-size: 14px;
	padding: 0;
	box-shadow: none;
	min-width: 0;
}
.tb-search input:focus { box-shadow: none; border: 0; }

/* TrutzBox-namespaced buttons that match the visual language but don't
 * collide with prosilver's `.button.button-primary` cascade. */
/* The button rules below double up the element selector (`a.tb-btn-…`,
 * `button.tb-btn-…`) to beat the global `a:link, a:visited` color rule
 * higher in this file — without those, Anmelden renders red-on-red
 * because `a:link` has higher specificity than a plain `.tb-btn-…`
 * class selector. */
.tb-btn,
a.tb-btn,
button.tb-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 0;
	font: inherit;
	font-weight: 500;
	font-size: 14px;
	cursor: pointer;
	border-radius: var(--tb-radius);
	padding: 8px 14px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--tb-dur-base) var(--tb-ease),
	            border-color var(--tb-dur-base) var(--tb-ease),
	            box-shadow var(--tb-dur-base) var(--tb-ease),
	            color var(--tb-dur-base) var(--tb-ease);
}
.tb-btn-primary,
a.tb-btn-primary,
a.tb-btn-primary:link,
a.tb-btn-primary:visited,
button.tb-btn-primary {
	background-color: var(--tb-red);
	color: #FFFFFF;
	box-shadow: var(--tb-shadow-btn);
}
.tb-btn-primary:hover,
a.tb-btn-primary:hover,
button.tb-btn-primary:hover {
	background-color: var(--tb-red-dark);
	color: #FFFFFF;
	box-shadow: var(--tb-shadow-btn-hover);
	text-decoration: none;
}
.tb-btn-secondary,
a.tb-btn-secondary,
a.tb-btn-secondary:link,
a.tb-btn-secondary:visited,
button.tb-btn-secondary {
	background-color: var(--tb-paper);
	color: var(--tb-fg1);
	border: 1px solid var(--tb-divider);
}
.tb-btn-secondary:hover,
a.tb-btn-secondary:hover,
button.tb-btn-secondary:hover {
	background-color: var(--tb-hover);
	border-color: rgba(0,0,0,0.2);
	color: var(--tb-fg1);
	text-decoration: none;
}
.tb-btn-text,
a.tb-btn-text,
a.tb-btn-text:link,
a.tb-btn-text:visited,
button.tb-btn-text {
	background-color: transparent;
	color: var(--tb-fg2);
}
.tb-btn-text:hover,
a.tb-btn-text:hover,
button.tb-btn-text:hover {
	background-color: var(--tb-hover);
	color: var(--tb-fg1);
	text-decoration: none;
}
.tb-btn-block { width: 100%; justify-content: center; padding: 10px 14px; }
.tb-btn .icon { color: currentColor; }

/* === Legacy navbar suppression =======================================
 *
 * The TrutzBox app bar already exposes brand, Forum nav, search,
 * Register, and Login. Everything in prosilver's `#nav-main` (quick
 * links dropdown, FAQ, search-shortcut, login/logout/register) is a
 * duplicate at this point — hide every direct `<li>` regardless of
 * class so we don't have to maintain a per-class allowlist.
 *
 * Breadcrumbs live in a separate `<ul class="nav-breadcrumbs">`
 * sibling. On the index, our `.tb-page-header` already shows
 * "Foren-Übersicht", so we hide breadcrumbs there too. Other pages
 * (viewforum, viewtopic, search, ucp) keep them — they're still the
 * primary way to navigate back up the tree until those screens get
 * their own redesign.
 */
.navbar {
	background-color: transparent;
	border-bottom: 0;
	box-shadow: none;
	padding: 0;
}
.navbar .inner { padding: 0; }
.navbar #nav-main > li { display: none; }
body.section-index .navbar { display: none; }

/* === Page header (breadcrumbs + title + actions) ===================== */

.tb-page-header {
	max-width: 1280px;
	margin: 18px auto 12px;
	padding: 0 24px;
}
.tb-crumbs {
	font-size: 12px;
	color: var(--tb-fg2);
	margin-bottom: 6px;
}
.tb-crumbs a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--tb-fg2);
	text-decoration: none;
}
.tb-crumbs a:hover { color: var(--tb-red); }
.tb-crumbs .icon { color: currentColor; }

.tb-title-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.tb-title-text h1 {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--tb-fg1);
	margin: 0;
}
.tb-subhead {
	color: var(--tb-fg2);
	margin-top: 2px;
	max-width: 620px;
	font-size: 13px;
}
.tb-title-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* === Two-column layout: forums + sidebar ============================= */

.tb-layout {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 16px;
	align-items: start;
}
@media (max-width: 1080px) {
	.tb-layout { grid-template-columns: 1fr; }
}
.tb-main { min-width: 0; }
.tb-time {
	color: var(--tb-fg2);
	font-size: 12px;
	margin: 0 0 8px;
}

.tb-sidebar {
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: sticky;
	top: 12px;
}

/* === Sidebar cards =================================================== */

.tb-card {
	background-color: var(--tb-paper);
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius-md);
	box-shadow: var(--tb-shadow-1);
	padding: 12px 14px;
}
.tb-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.tb-card-header h3 {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--tb-fg1);
	margin: 0;
}

.tb-link {
	color: var(--tb-red);
	font-size: 12px;
	font-weight: 500;
}
.tb-link:hover { color: var(--tb-red-dark); }
.tb-link-small { font-size: 11px; }

/* Login form */
.tb-field {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 6px;
}
.tb-field span {
	font-size: 12px;
	color: var(--tb-fg2);
	font-weight: 500;
}
.tb-field input {
	border: 1px solid var(--tb-divider);
	border-radius: var(--tb-radius);
	padding: 6px 10px;
	font: inherit;
	font-size: 13px;
	background-color: var(--tb-paper);
	color: var(--tb-fg1);
	transition: border-color var(--tb-dur-base) var(--tb-ease),
	            box-shadow var(--tb-dur-base) var(--tb-ease);
}
.tb-field input:focus {
	outline: 0;
	border-color: var(--tb-red);
	box-shadow: 0 0 0 3px var(--tb-red-tint);
}
.tb-row-between {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 4px 0 8px;
	font-size: 12px;
	gap: 8px;
}
.tb-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--tb-fg2);
	cursor: pointer;
}
.tb-check input { accent-color: var(--tb-red); }
.tb-card-foot {
	margin: 8px 0 0;
	font-size: 11px;
	color: var(--tb-fg2);
	line-height: 1.45;
}

/* Legend */
.tb-legend {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 11.5px;
	color: var(--tb-fg2);
}
.tb-legend li {
	display: flex;
	align-items: center;
	gap: 7px;
}
.tb-legend-icon {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	border: 1px solid;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	background-size: 18px 18px;
	flex-shrink: 0;
}
.tb-legend-unread {
	border-color: var(--tb-red);
	background-color: rgba(212, 48, 30, 0.08);
	background-image: url("./images/forum_unread.svg");
}
.tb-legend-read {
	border-color: rgba(0, 0, 0, 0.12);
	background-color: #FAFAFA;
	background-image: url("./images/forum_read.svg");
}

/* === Chips =========================================================== */

.tb-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3px;
	padding: 3px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	margin-left: 8px;
	vertical-align: middle;
}
.tb-chip .icon { font-size: 11px; color: currentColor; }
.tb-chip-red {
	background-color: var(--tb-red-tint);
	color: var(--tb-red);
}
.tb-chip-warn {
	background-color: rgba(237, 108, 2, 0.12);
	color: var(--tb-warning-dark);
}
.tb-chip-inline {
	text-transform: none;
	padding: 2px 7px;
	font-size: 11px;
	margin-left: 0;
}

/* Verified Comidio-team mark — small filled red circle with a white tick.
 * Used inline with author names in the last-post column and in the legend. */
.tb-verified-mark {
	display: inline-block;
	width: 13px;
	height: 13px;
	background:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='8' fill='%23D4301E'/><path d='M4.5 8.2l2.3 2.3L11.5 5.7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>")
		center / contain no-repeat;
	vertical-align: -2px;
}

/* Tag the verified comidio-team author by name. There's no per-user
 * "verified" flag in phpBB's row data, so we match by exact username. */
ul.topiclist dd.lastpost a.username-coloured[href*="comidio"]::after,
ul.topiclist dd.lastpost a.username[href*="comidio"]::after {
	content: "";
	display: inline-block;
	width: 13px;
	height: 13px;
	margin-left: 4px;
	background:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='8' fill='%23D4301E'/><path d='M4.5 8.2l2.3 2.3L11.5 5.7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>")
		center / contain no-repeat;
	vertical-align: -2px;
}

/* === Per-forum icon glyphs ===========================================
 *
 * Each forum row has `forum-id-{N}` (added in the forked
 * forumlist_body.html). Override the generic forum_read.svg /
 * forum_unread.svg with a forum-specific glyph SVG. Selector
 * specificity has to beat `.forum_read { background-image: ...; }`,
 * which is why we chain `.forum-id-N dl.row-item.forum_*`.
 *
 * IDs are the actual forum_id values assigned by the running DB on
 * forum.trutzbox.de (verified via the rendered DOM):
 *    3 = Allgemeine Fragen        →  chat bubbles
 *    5 = TrutzBox Setup           →  gear
 *    6 = Comidio Shop             →  storefront
 *    7 = TrutzMail                →  envelope
 *    8 = TrutzBrowse              →  globe
 *    9 = TrutzContent             →  shield + web dots
 *   10 = TrutzBase                →  shield + check
 *   19 = Mitteilungen / Updates   →  megaphone
 *   20 = TrutzRTC                 →  video camera
 *   21 = TrutzBox Erweiterungen   →  puzzle piece
 *
 * If forum IDs differ on a fresh install, regenerate the matching SVG
 * files and edit this block — the rest of the row-icon machinery falls
 * back to the generic forum_read.svg / forum_unread.svg.
 */
.forum-id-3  dl.row-item.forum_read   { background-image: url("./images/forum-3_read.svg"); }
.forum-id-3  dl.row-item.forum_unread { background-image: url("./images/forum-3_unread.svg"); }
.forum-id-5  dl.row-item.forum_read   { background-image: url("./images/forum-5_read.svg"); }
.forum-id-5  dl.row-item.forum_unread { background-image: url("./images/forum-5_unread.svg"); }
.forum-id-6  dl.row-item.forum_read   { background-image: url("./images/forum-6_read.svg"); }
.forum-id-6  dl.row-item.forum_unread { background-image: url("./images/forum-6_unread.svg"); }
.forum-id-7  dl.row-item.forum_read   { background-image: url("./images/forum-7_read.svg"); }
.forum-id-7  dl.row-item.forum_unread { background-image: url("./images/forum-7_unread.svg"); }
.forum-id-8  dl.row-item.forum_read   { background-image: url("./images/forum-8_read.svg"); }
.forum-id-8  dl.row-item.forum_unread { background-image: url("./images/forum-8_unread.svg"); }
.forum-id-9  dl.row-item.forum_read   { background-image: url("./images/forum-9_read.svg"); }
.forum-id-9  dl.row-item.forum_unread { background-image: url("./images/forum-9_unread.svg"); }
.forum-id-10 dl.row-item.forum_read   { background-image: url("./images/forum-10_read.svg"); }
.forum-id-10 dl.row-item.forum_unread { background-image: url("./images/forum-10_unread.svg"); }
.forum-id-19 dl.row-item.forum_read   { background-image: url("./images/forum-19_read.svg"); }
.forum-id-19 dl.row-item.forum_unread { background-image: url("./images/forum-19_unread.svg"); }
.forum-id-20 dl.row-item.forum_read   { background-image: url("./images/forum-20_read.svg"); }
.forum-id-20 dl.row-item.forum_unread { background-image: url("./images/forum-20_unread.svg"); }
.forum-id-21 dl.row-item.forum_read   { background-image: url("./images/forum-21_read.svg"); }
.forum-id-21 dl.row-item.forum_unread { background-image: url("./images/forum-21_unread.svg"); }

/* === Last-post tweaks for the new template ===========================
 *
 * The forked forumlist_body wraps the author in `.tb-lastpost-author`
 * and the jump-arrow in `.tb-lastpost-jump` so we don't have to chase
 * prosilver's `<br>`-separated layout. The author still uses phpBB's
 * username/username-coloured anchors for color, so existing `.username`
 * rules continue to apply.
 */
ul.topiclist dd.lastpost .tb-lastpost-author {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
}
ul.topiclist dd.lastpost .tb-lastpost-jump {
	margin-left: 4px;
	opacity: 0.6;
}
ul.topiclist dd.lastpost .tb-lastpost-jump:hover { opacity: 1; }
ul.topiclist dd.lastpost time {
	display: block;
	margin-top: 1px;
}

/* Push prosilver's `dd.lastpost > span { display: block; }` quirks back
 * to inline so our flow matches the design's two-line column. */
ul.topiclist dd.lastpost > span > br { display: none; }

