/* Small additions to the classic gpack for things TravianZ did with GET links and MooTools.
   Actions are POST forms now (anti-forgery), so their buttons are styled to look like the old links. */
form.inline { display: inline; margin: 0; padding: 0; }
button.iconbtn { border: 0; background: none; padding: 0; margin: 0; cursor: pointer; vertical-align: middle; }
button.linkbtn { border: 0; background: none; padding: 0; margin: 0; cursor: pointer; font: inherit; font-weight: bold; color: #71D000; }
button.linkbtn:hover { text-decoration: underline; }
#res td.full { color: #c00; }
#res td.spacer { width: 420px; }
table.worlds { width: 100%; margin-top: 12px; }
table.worlds th, table.worlds td { padding: 4px 6px; text-align: left; }
/* Prerequisites: missing ones stand out, met ones are greyed out (as in the TravianZ manual). */
.prereq-ok, .prereq-ok a { color: #aaa; }
.prereq-missing a { font-weight: bold; }
div.popup3 iframe { background: #fff; border: 1px solid #c0c0c0; }


/* tasks page: the quest_core25 dialog as a page (#qstd over the #qstbg picture) */
div#content.quest { width: 450px; min-height: 560px; padding: 43px 25px 0; }
div#content.quest div#qstbg { left: 36px; top: 150px; }
div#content.quest form.inline button.linkbtn b { color: #71D000; }
div.alliance table.forum_posts td.pla { width: 110px; vertical-align: top; }
div.alliance table.forum_posts td.text { white-space: pre-wrap; vertical-align: top; }

/* karte2 — the Plus large map on its own page */
body.largemap { margin: 10px auto; width: 999px; background: #fff; }

/* the advice to turn on 2FA, once per login */
div#tfa_hint { position: fixed; z-index: 1000; left: 50%; top: 130px; width: 380px; margin-left: -190px; padding: 14px 18px; background: #fff; border: 1px solid #71d000; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
div#tfa_hint h2 { margin: 0 0 8px; font-size: 15px; }
div#tfa_hint p.tfa_buttons { margin: 10px 0; }
div#tfa_hint label { font-size: 11px; }
/* tasks as the popup of the original */
div.popup3.quest { padding-top: 31px; }
div.popup3.quest #popup3 { position: relative; height: 425px; overflow: hidden; }
div.popup3.quest form.inline button.linkbtn b { color: #71D000; }

/* side menu: a long server name takes two lines, so the hover bar grows with it instead of running into the next link */
div#side_navi p:not(.deltimer) a { width: 113px; }
div#side_navi p:not(.deltimer) a:hover { height: auto; min-height: 20px; background-size: 113px 100%; }
/* farm list forms: a box per unit with the number at home under it */
.farm_troops { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 6px 0; }
.farm_unit { display: inline-block; text-align: center; }
.farm_unit a { display: block; font-size: 11px; line-height: 16px; }
/* number boxes of the game: the browser arrows took the room of the digits */
input.text[type=number] { -moz-appearance: textfield; appearance: textfield; }
input.text[type=number]::-webkit-inner-spin-button, input.text[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
div#build table.build_details td.val input.text { width: 70px; }
/* graphic pack page: one row per pack with a small preview of its colours */
table.gp_list td.gp_pick { padding: 6px 8px; }
table.gp_list label.gp_option { display: flex; align-items: center; gap: 10px; cursor: pointer; white-space: normal; }
table.gp_list span.gp_swatch { display: inline-flex; flex: 0 0 auto; width: 54px; height: 30px; border: 1px solid #a0a0a0; border-radius: 3px; overflow: hidden; flex-direction: column; }
table.gp_list span.gp_swatch i { display: block; flex: 1; }
table.gp_list span.gp_swatch i:first-child { flex: 1.3; }
table.gp_list span.gp_swatch i:last-child { flex: .5; }
table.gp_list .gp_desc { color: #777; font-size: 11px; }
table.gp_list div.gp_custom { margin: 8px 0 2px 26px; }
table.gp_list div.gp_custom input.text { width: 300px; max-width: 100%; }

/* marketplace: the Gold Club's last and favourite shipments */
table.saved_shipments { width: 100%; margin-top: 12px; }
table.saved_shipments td { padding: 3px 5px; vertical-align: middle; }
table.saved_shipments td.res img { margin: 0 2px 0 6px; vertical-align: middle; }
table.saved_shipments td.res b.rep { margin-left: 8px; }
table.saved_shipments td.act, table.saved_shipments td.opt { white-space: nowrap; text-align: center; width: 1%; }
table.saved_shipments form { display: inline; margin: 0; }
table.saved_shipments button.star { font-size: 15px; color: #b0b0b0; }
table.saved_shipments button.star.on { color: #e0a800; }
table.saved_shipments button.del { margin-left: 6px; color: #c00; }
table.saved_shipments button:disabled { color: #aaa; cursor: default; text-decoration: none; }

/* the admin's freeze of the world: a strip on top and a message in the middle of the screen */
#freeze_bar { position: relative; z-index: 900; text-align: center; font-size: 12px; padding: 6px 10px; color: #fff; background: #1f5f9e; }
#freeze_bar.soon { background: #8a5a00; }
#freeze_bar button { all: unset; cursor: pointer; }
#freeze_bar button:hover, #freeze_bar button:focus-visible { text-decoration: underline; }
#freeze_bar .freeze_left { font-family: monospace; font-weight: bold; }
#freeze_box { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 25, 45, .55); }
#freeze_box .freeze_card { position: relative; width: 100%; max-width: 440px; box-sizing: border-box; padding: 22px 24px 18px; text-align: center; color: #1d2b3a;
    background: #fbfdff; border: 1px solid #9fbbd6; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
#freeze_box .freeze_tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: bold; color: #fff; background: #1f5f9e; }
#freeze_box h2 { margin: 10px 0 6px; font-size: 20px; color: #17324d; }
#freeze_box .freeze_reason { margin: 0 0 12px; white-space: pre-line; line-height: 1.5; }
#freeze_box table.freeze_dates { margin: 0 auto 14px; background: transparent; }
#freeze_box table.freeze_dates th, #freeze_box table.freeze_dates td { background: transparent !important; padding: 2px 8px; border: 0; }
#freeze_box .freeze_count { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; }
#freeze_box .freeze_count div { min-width: 64px; padding: 8px 4px; border-radius: 8px; background: #e8f1fa; }
#freeze_box .freeze_count b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; color: #17324d; }
#freeze_box .freeze_count span { font-size: 11px; color: #4b6075; }
#freeze_box .freeze_note { margin: 0; font-size: 11px; color: #4b6075; line-height: 1.5; }
#freeze_box #freeze_close { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #4b6075; }
html[dir=rtl] #freeze_box #freeze_close { right: auto; left: 10px; }
@media (max-width: 420px) { #freeze_box .freeze_count div { min-width: 0; flex: 1; } }

#freeze_bar.end { background: #7a5a12; }
#freeze_box.end .freeze_card { max-width: 520px; border-color: #c9a96e; background: #fffaf0; }
#freeze_box.end h2 { color: #4a3018; }
#freeze_box .freeze_win { display: block; margin: 0 auto 6px; max-width: 160px; height: auto; }
#freeze_box a.freeze_more { font-weight: bold; }

/* login and register: places taken of the world's player limit */
p.slots { text-align: center; margin: 6px 0 10px; }
p.full_notice { text-align: center; font-weight: bold; }
button#btn_signup:disabled { opacity: .45; cursor: not-allowed; }

/* admin spectate mode: a fixed bar over the game */
.spectate-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; background: #7a1010; color: #fff; text-align: center; font: bold 13px/1.4 Verdana, Arial, sans-serif; padding: 6px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.spectate-bar a { color: #ffe36e; margin-inline-start: 12px; text-decoration: underline; }
body:has(.spectate-bar) { padding-top: 30px; }
