/* Oldschooltibia: tibia.com as it looked around Tibia 7.4 (late 2004).
   Geometry follows the original page: black body with 5% gutters, 64px header,
   20px topic bar, 130px stone panel on the left, parchment content. */

body {
	margin: 0;
	background: #000;
	color: #000;
	font: 10pt Verdana, Arial, Helvetica, sans-serif;
}
#frame { margin: 0 5%; min-width: 720px; }

a { color: #004294; text-decoration: none; }
a:hover { text-decoration: underline; }
img { border: 0; }

/* ---------- header ---------- */
#header { display: flex; height: 64px; border-bottom: 1px solid #000; background: #262634 url(images/header.png); }
#logo {
	flex: 0 0 220px; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(90deg, #000 0, rgba(0, 0, 0, .55) 70%, rgba(0, 0, 0, 0) 100%);
	text-decoration: none;
}
#logo span {
	font: italic bold 27px Georgia, "Times New Roman", serif; letter-spacing: -.5px;
	color: #e9c25a; text-shadow: 0 1px 0 #7a4b08, 0 2px 0 #3d2504, 2px 3px 3px #000;
}
#header-mid { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; }
#banner {
	box-sizing: border-box; width: 468px; height: 60px; padding: 6px 14px;
	display: grid; grid-template-columns: 1fr auto; align-content: center; column-gap: 12px;
	border: 1px solid; border-color: #0b0b12 #55556a #55556a #0b0b12;
	background: #15151f url(images/stone-dark.png); color: #d9c89a;
}
#banner strong { font: bold 17px Georgia, "Times New Roman", serif; color: #f0d682; }
#banner em { grid-column: 1; font-size: 11px; font-style: normal; color: #b8ab8c; }
#banner span { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 11px; font-weight: bold; }
.up { color: #63d463; }
.down { color: #f0695f; }
#header-right {
	flex: 0 0 78px; display: flex; align-items: center; justify-content: center;
	font: bold 22px Georgia, "Times New Roman", serif; color: #6f6f86; text-shadow: 1px 1px 0 #000;
	background: linear-gradient(270deg, #000 0, rgba(0, 0, 0, 0) 100%);
}

/* ---------- topic bar and stone panel ---------- */
#topics { display: flex; }
#panel-top, #panel { flex: 0 0 130px; box-sizing: border-box; background: #505050 url(images/stone.png); }
#panel-top { padding: 0 4px; text-align: center; box-shadow: inset -1px 0 0 #2a2a2a, inset 1px 0 0 #747474; }
#topic-bar {
	flex: 1; height: 20px; display: flex; justify-content: space-around;
	background: #505050 url(images/stone.png);
	box-shadow: inset 0 1px 0 #7a7a7a, inset 0 -1px 0 #262626;
}
.topic {
	display: inline-block; height: 20px; padding: 0 12px; white-space: nowrap;
	font: bold 13px/20px Georgia, "Times New Roman", serif; letter-spacing: .4px;
	color: #d9c89a; text-shadow: 1px 1px 0 #000;
}
.topic:hover, .topic.on { color: #ffe08a; text-decoration: none; }

#main { display: flex; align-items: stretch; background: #000; }
#panel { padding: 0 4px 10px; box-shadow: inset -1px 0 0 #2a2a2a, inset 1px 0 0 #747474; align-self: flex-start; }
.sep { height: 0; margin: 4px 1px 5px; border-top: 1px solid #262626; border-bottom: 1px solid #848484; }
.sep.small { margin: 3px 10px 0; }
.sub {
	display: block; box-sizing: border-box; width: 120px; height: 20px; margin: 0 auto 2px;
	font: bold 11px/18px Verdana, Arial, sans-serif; text-align: center; white-space: nowrap; overflow: hidden;
	color: #e8d9b0; text-shadow: 1px 1px 0 #000;
	border: 1px solid; border-color: #8c8c8c #1d1d1d #1d1d1d #8c8c8c;
	background: #444 url(images/stone-dark.png);
}
.sub:hover { color: #ffe08a; text-decoration: none; }
.sub.on { color: #ffe08a; border-color: #1d1d1d #8c8c8c #8c8c8c #1d1d1d; }
.panel-head { margin: 0 0 3px; font: bold 12px/16px Georgia, "Times New Roman", serif; letter-spacing: .4px; text-align: center; color: #d9c89a; text-shadow: 1px 1px 0 #000; }
.panel-head.on { color: #ffe08a; }
#status { padding: 2px 4px 0; font-size: 11px; line-height: 16px; text-align: center; color: #d9c89a; }
#status b, #status a { display: block; }
#status a { color: #e8d9b0; }

/* ---------- parchment ---------- */
#paper {
	flex: 1; min-width: 0; position: relative; box-sizing: border-box;
	padding: 20px 26px 18px 28px;
	background: #f1e0c6 url(images/paper.png);
}
#paper::before, #paper::after, #content::before, #footer::after { content: ""; position: absolute; pointer-events: none; }
#paper::before { top: 0; left: 0; right: 0; height: 11px; background: url(images/paper-top.png) repeat-x; }
#paper::after { top: 0; bottom: 0; left: 0; width: 12px; background: url(images/paper-left.png) repeat-y; }
#content::before { top: 0; bottom: 0; right: 0; width: 12px; background: url(images/paper-right.png) repeat-y; }
#footer::after { left: 0; right: 0; bottom: 0; height: 11px; background: url(images/paper-bottom.png) repeat-x; }
#content { min-height: 420px; overflow-wrap: break-word; }
#footer { margin-top: 24px; padding: 8px 0 6px; border-top: 1px solid #b89f7a; font-size: 10px; text-align: center; color: #5a4a36; }
#footer p { margin: 2px 0; }

/* ---------- content ---------- */
h1, h2, h3 { font-family: Verdana, Arial, Helvetica, sans-serif; color: #5a2800; }
h1 { font-size: 16pt; }
h2 { font-size: 13pt; }
h3 { font-size: 11pt; }
h1.page-title { margin: 0 0 12px; padding-bottom: 4px; border-bottom: 2px solid #5a2800; }
#content table { font-size: 10pt; }
#content td, #content th { padding: 3px 5px; }
.white, .white a, #content tr[bgcolor="#505050"] td, #content tr[bgcolor="#505050"] th,
#content td[bgcolor="#505050"], #content th[bgcolor="#505050"] { color: #fff; font-weight: bold; }
hr { height: 0; border: 0; border-top: 1px solid #b89f7a; }
input, select, textarea, button { font: 10pt Verdana, Arial, Helvetica, sans-serif; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea {
	border: 1px solid; border-color: #6b5a41 #d9c6a4 #d9c6a4 #6b5a41; background: #fff; padding: 2px 3px;
}
input[type="submit"], input[type="button"], button {
	padding: 2px 12px; cursor: pointer; font-weight: bold; color: #e8d9b0; text-shadow: 1px 1px 0 #000;
	border: 1px solid; border-color: #8c8c8c #1d1d1d #1d1d1d #8c8c8c; background: #444 url(images/stone-dark.png);
}
input[type="submit"]:hover, input[type="button"]:hover, button:hover { color: #ffe08a; }

table.news { margin-bottom: 16px; }
#content .news-head td { background: #505050; color: #fff; font-weight: bold; padding: 3px 6px; }
#content .news-date { width: 1%; white-space: nowrap; }
#content .news-author { width: 1%; white-space: nowrap; font-weight: normal; text-align: right; }
#content .news-body { padding: 8px 6px 4px; line-height: 1.45; }
#content .news-comments { text-align: right; font-size: 9pt; }

@media (max-width: 800px) {
	#frame { margin: 0; min-width: 0; }
	#header-mid, #header-right { display: none; }
	#logo { flex: 1; }
	#topic-bar { flex-wrap: wrap; height: auto; }
	#main { flex-direction: column; }
	#panel-top { display: none; }
	#panel { flex: none; width: 100%; align-self: stretch; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 6px 4px; }
	#panel .sep { display: none; }
	#panel .panel-head { flex-basis: 100%; margin: 4px 0 0; }
	.sub { margin: 0; }
	#status { flex-basis: 100%; }
	#paper { padding: 18px 16px; }
}
