/* General Styles */
caption {
	white-space: nowrap;
	font-family: "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 13px;
}

td {
        font-family: "Segoe UI", Helvetica, Arial, sans-serif;
        font-size: 13px;
}

.trlight, .trdark {
        overflow-wrap: anywhere;
}


table.dataTable > tbody > tr.trhead,
.trhead {
    background-color: #1f1f1f;
    color: #e6e6e6;
}

table.dataTable > tbody > tr.trlight,
.trlight {
    background-color: #181818;
    color: #cccccc;
}

table.dataTable > tbody > tr.trdark,
.trdark {
    background-color: #0f0f0f;
    color: #cccccc;
}

table.dataTable > tbody > tr.trhighlight,
.trhilight {
    background-color: #24311c;
    color: #e6f2d8;
}

.trlight td,
.trdark td {
    background-color: inherit;
    color: inherit;
}


.main-body {
        background-image: url('page-bg-q80.webp');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: top right;
	background-attachment: fixed;
	background-color: #111;
	color: #CCCCCC;
	margin: 0;
}

@media (max-width: 968px) {
	.main-body {
		background-size: cover;
		background-position: top 10% right 30%;
	}
	.pageheader-center > img {
		width: 50%;
	}
	.pageheader-right > img {
		width: 27%;
	}
	.petition {
		padding-left: 15px;
	}
}


.popup-body {
	background-color: #111;
	color: #CCCCCC;
}

/* Offcanvas sidebars should match the main page background */
.offcanvas {
        background-image: url('page-bg-q80.webp');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: top right;
	background-color: #111;
	color: #CCCCCC;
}

/* Navigation Table */
table.nav {
	border: 1px solid #000000;
	height: auto;
	width: 182px;
}

.navhead {
	text-decoration: none;
	width: 100%;
	height: auto;
	padding: 1px;
	float: left;
	line-height: 33px;
	clear: none;
	color: #FFFFFF;
	cursor: default;
	text-align: center;
	font-family: Tahoma Small Cap;
	font-weight: bolder;
}
.navheadsub {
	text-decoration: none;
	width: 170px;
	height: auto;
	padding: 1px;
	float: left;
	line-height: 33px;
	clear: none;
	color: #FFFFFF;
	cursor: default;
	text-align: center;
	font-family: Tahoma Small Cap;
	font-weight: bolder;
	margin-left: 10px;
}

a {
	color: #669933;
	text-decoration: none;
}

/* Header and other styles */

.page-header {
	padding-bottom: 3px;
	/*background: url('header-bg.png') repeat-x;*/
}

.main-content {
	border-style: dotted;
	/*background-color: #1b1b1b;*/
	box-shadow: 0 0 5px rgba(0,0,0,0.5);
	align-content: start;
}

.sidebar-content {
	min-width: 160px;
	max-width: 208px;
	padding-left: 3px;
	padding-right: 3px;
	align-content: start;
}

.pageheader-center, .pageheader-left, .pageheader-right {
	width: 33.3%;
	padding: 3px;
	text-align: center;
}

@media (max-width: 768px) {
}

.pageheader-left {
	text-align: left;
}

.pageheader-right {
        text-align: right;
}

.action-bar,
.mail-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.action-bar__link,
.mail-nav__link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/*
 * Only the contained anchor inherits color because setting color on the control
 * wrapper would override the theme color supplied by `.button`.
 */
.action-bar__link a,
.mail-nav__link a {
    color: inherit;
    text-decoration: none;
}




/* Navigation Link */
a.nav {
	color: #30d5c8;
	text-decoration: none;
	width: 100%;
	height: auto;
	float: left;
	padding: 1px;
	clear: none;
	text-align: center;
}

.navhelp {
	text-decoration: none;
	width: 100%;
	height: auto;
	padding: 1px;
	float: left;
	clear: none;
	color: #30d5c8;
}

.sidebar-content img.nav-bottom {
	margin-top: 15px;
}

/* Translations and others */

select {
	background-color: #000000;
	border: 1px solid #999999;
	color: #CCCCCC;
}

table.vitalinfo {
	background-color: #333333;
	border: 1px solid #000000;
	width: 182px;
}

a.motd, a:hover.motd,
a.hotmotd {
	font-weight: normal;
	color: #FFFFFF;
}

.pagetitle {
	font-family: "Arial Black", "Courier";
	font-variant: small-caps;
	font-size: 14px;
	color: #000000;
}

.navhi {
	color: #c61d2e;
	text-decoration: underline;
}

td.nav a.thot {
	position: absolute;
	left: 0px;
	height: auto;
}

td.nav a.t {
	position: absolute;
	left: 0px;
	height: auto;
}

/* Hover Effects */
a:hover.nav {
	background-color: #404040;
	border: none;
	color: #FFFFFF;
}

/* Message of the Day Link */
a.motd, a:hover.motd {
	text-decoration: none;
	color: #c61d2e;
	font-weight: normal;
}
a:hover.motd {
	color: #FFFFFF;
}

/* Character Info Styles */
td.charhead {
	background-color: #222222;
	color: #FFFFFF;
}

table.charinfo {
	width: 182px;
	color: #FFFFFF;
	border: none;
	border-spacing: 0px;
}

td.charinfo {
	color: #FFFFFF;
	border-top: 1px solid #FFFFFF;
	cursor: default;
	padding: 2px;
}

/* Specific adjustments for td elements that used inline background attributes */
td[class*="page-top"] {
	background-image: url('/templates/images/page_top.gif');
}

td[class*="page-bottom"] {
	background-image: url('/templates/images/page_bot.gif');
}

/* Button Styles */
.button {
	font-family: "Segoe UI", Helvetica, Arial, sans-serif;
	padding: 2px 8px;
}


.login-submit {
	text-align: center;
}

/* Login session message panel */
.login-message {
	background-color: rgba(36, 49, 28, 0.92);
	border: 1px solid #669933;
	border-radius: 6px;
	color: #e6f2d8;
	font-size: 14px;
	line-height: 1.45;
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
}

/* Other Styles */
.select {
	background-color: #000000;
	border: 1px solid #999999;
	color: #CCCCCC;
}

.stonage {
	background-image: url(/templates/images/stone_corner.gif);
	background-repeat: no-repeat;
	background-position: left top;
}

.stonage2 {
	background-image: url(/templates/images/stone_center.gif);
	background-repeat: no-repeat;
	background-position: left top;
	color: #669933;
}

/* Background Images for Different Sections */
td.village {
	background-image: url(/templates/images/village.jpg);
	background-repeat: no-repeat;
	background-position: right bottom;
}

td.forest {
	background-image: url(/templates/images/forest.jpg);
	background-repeat: no-repeat;
	background-position: center bottom;
}

td.dragon {
	background-image: url(/templates/images/dragon.jpg);
	background-repeat: no-repeat;
	background-position: center center;
	background-attachment: fixed;
}

/* Petition */
table.petition-count {
	float: right;
	text-align: right;
}

/* Additional styles as needed based on your layout and design requirements */

.nav {
	display: flow;
}

/* Layout helper classes */
.align-center {
	text-align: center;
}

.align-left {
	text-align: left;
}

.align-right {
	text-align: right;
}

.valign-top {
	vertical-align: top;
}

.valign-bottom {
	vertical-align: bottom;
}

.noborder {
	border: 0;
}

.navad-wrapper {
	position: relative;
	top: -15px;
	text-align: center;
}

.verticalad-wrapper {
	float: right;
}

.nav-container {
	text-align: center;
	padding-top: 4px;
	padding-bottom: 4px;
}

.layout-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

.clear {
	clear: both;
	display: block;
}

.nav-top,
.nav-bottom {
	width: 100%;
}

.login-hero {
	width: 100%;
	max-width: 512px;
	height: auto;
	aspect-ratio: 1 / 1;
	background: url('login-hero.png') center/cover no-repeat;
	display: block;
	border-radius: 16px;
	overflow: hidden;
}

.hidden {
	display: none;
}

/* Form Fields */
.formfield-value {
	word-break: break-all;
}

/* Translator Buttons styling */
a.t, a.thot {
	display: inline-block;
	width: 10px;
	height: 10px;
	font-size: 8px;
	line-height: 10px;
	text-align: center;
	color: #fff;
	text-decoration: none;
	border-radius: 3px;
	margin-left: 2px;
	cursor: help;
	border: 1px solid #aaa;
}

/* Normal Button */
a.t {
	background-color: #555; /* less... conspicious */
	border-color: #888;
}

/* Hot Button, not translated */

a.thot {
	background-color: #c0392b; /* really red for "hot" */
	border-color: #e74c3c;
	font-weight: bold;
}

/* Hover effects for translator buttons */
a.t:hover, a.thot:hover {
	transform: scale(1.5);
	box-shadow: 0 0 4px #fff;
	z-index: 10;
}

/* Hidden elements, for i.e. debug output */
.hidden {
	display: none;
}

div.debug {
	background-color: #1e1e1e; /* dark gray, easy on the eyes */
	color: #d4d4d4; /* slightly muted white for good readability */
	border: 1px dashed #555; /* subtle, technical look */
	font-family: Consolas, monospace; /* clear debug font */
	font-size: 11px; /* slightly larger than before for better readability */
	padding: 10px;
	margin: 12px 0;
	white-space: pre-wrap; /* preserves structure and lines */
	overflow-x: auto; /* scrollbar for long lines */
	border-radius: 4px;
	box-shadow: 0 0 4px rgba(0,0,0,0.4); /* subtle depth */
}

/* Mobile specific tweaks */
@media (max-width: 1100px) {
	.mobile-toggles .navbar-toggler {
		border: none;
	}
}

table a, .table a {
	text-decoration: none;
}

.navheadsub {
	text-decoration: none;
	width: 170px;
	height: auto;
	padding: 1px;
	float: left;
	line-height: 33px;
	clear: none;
	color: #FFFFFF;
	cursor: default;
	text-align: center;
	font-family: "Tahoma Small Cap", Tahoma, sans-serif;
	font-weight: bolder;
	margin-left: 10px;
}

/*
 * Shared interactive-control contract.
 *
 * The game can emit the same action as an anchor, a native button, or a
 * non-interactive span. Keeping every metric here prevents those variants from
 * changing size when a mail action becomes unavailable. `.btn-close` is not
 * targeted: Bootstrap must retain control of its background-image close icon.
 */
.button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #669933;
    border-radius: 0.35rem;
    background: #24311c;
    color: #e6f2d8;
    font: inherit;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease,
        box-shadow 120ms ease, transform 60ms ease;
}

/* Add line spacing when consecutive inline buttons wrap in the narrow mailbox popup. */
form > .button {
    margin-block: 2px;
}

/* Color and elevation make hover visible without changing control metrics. */
.button:not([aria-disabled="true"]):not(:disabled):hover {
    background: #314225;
    color: #e6f2d8;
    text-decoration: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 30%);
}

/* The offset outline is a non-color-only focus cue against the skin canvas. */
.button:not([aria-disabled="true"]):focus-visible {
    outline: 3px solid #b7ff6a;
    outline-offset: 2px;
    box-shadow: 0 0 0 1px #24311c;
}

.button:not([aria-disabled="true"]):not(:disabled):active {
    background: #182112;
    color: #e6f2d8;
    box-shadow: inset 0 2px 3px rgb(0 0 0 / 35%);
    transform: translateY(1px);
}

/*
 * Disabled actions stay legible and stable. Explicit interaction overrides are
 * intentional because a disabled span still participates in selector matching.
 */
.button[aria-disabled="true"],
.button[aria-disabled="true"]:hover,
.button[aria-disabled="true"]:active,
.button:disabled,
.button:disabled:hover,
.button:disabled:active {
    border-color: #79866e;
    background: #30382b;
    color: #e6e6e6;
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
    transform: none;
}

/*
 * Wider gaps separate adjacent targets. The shared `.button` class retains
 * ownership of each control's sizing and label-wrapping behavior.
 */
.mail-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mail-nav__link {
    flex: 0 1 auto;
    min-width: 0;
}
