/* Page-specific rules that used to live in each template's {% block head_style %}.
 *
 * They were moved here so they are part of the persistent, always-loaded
 * stylesheet: the utatar `quick` links navigate by swapping page content only,
 * without reloading <head>, so per-page <style> blocks in <head> were dropped on
 * AJAX navigation and the page rendered unstyled until a full refresh. Every
 * selector below is page-scoped (#build.gidN, div.village1, …) so loading them
 * globally is inert on other pages. */

/* build/* — all build pages: the global a:hover rule puts a filter on the
   <a.build_logo>, which makes the anchor the containing block for the
   absolutely-positioned logo <img>, so the image teleported away on hover
   (and flickered back once the cursor lost it). Keep the hover brightness
   on the image itself, where it cannot move anything. */
div#build a.build_logo:hover { filter: none; }
div#build a.build_logo:hover img { filter: brightness(87%); }

/* build/available.html — Wonder of the World page (gid40) + new-building (gid0) */
/* Arabic Wonder page: keep TravianZ's sprite size/vertical spacing, mirrored so
   the image sits on the left and Arabic text reads cleanly on the right. */
#build.gid40 { direction: rtl; text-align: right; }
#build.gid40 h1 { position: static; top: auto; margin: 0 0 8px; padding-left: 200px; text-align: right; color: #000; font-size: 24px; line-height: 1.05; }
#build.gid40 h1.GreenWord { color: #000; }
#build.gid40 h1 span.level { color: #000; font-size: 24px; font-weight: bold; }
#build.gid40 p.build_desc { padding-left: 200px; padding-right: 0; text-align: right; min-height: 120px; }
#build.gid40 p.nam { padding-left: 200px; text-align: center; margin: 10px 0; }
#build.gid40 p.ww-rename { padding-left: 200px; text-align: center; margin: 12px 0 14px; }
#build.gid40 p#contract { line-height: 19px; padding: 0 0 0 200px; text-align: right; direction: rtl; clear: both; }
#build.gid40 p#contract b { display: inline; margin: 0; }
#build.gid40 p#contract .ww-cost-label { font-weight: bold; }
/* rtl so the costs read resources-first and the build time lands at the end
   of the line (far left), like every other build page's contract row. */
#build.gid40 p#contract .ww-cost-row { direction: rtl; display: inline-block; white-space: nowrap; }
#build.gid40 p#contract a.build { color: #71d000; font-weight: bold; }
#build.gid40 a.build_logo img.g40 { background-image: url(../../img/g/g40.gif); background-size: auto; background-repeat: no-repeat; width: 214px; height: 154px; position: absolute; right: auto; left: 8px; top: 50px; z-index: 5; transform: none !important; scale: none !important; animation: none !important; transition: none !important; will-change: auto; }
#build.gid0 td.requ { text-align: right; font-weight: bold; line-height: 1.35; }
#build.gid0 td.requ .req-ok { color: #71b02f; }
#build.gid0 td.requ .req-miss { color: #c92323; }

/* build/embassy.html — scoped to gid18: the unscoped version widened EVERY
   build page to 556px (it was only ever meant for the embassy). */
#build.gid18 { width: 556px; padding: 43px 10px 0; }

/* build/main_building.html (gid15) */
.mb-btn-green {
  color: #33BB33 !important;
  font: inherit;
  font-weight: bold;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
#build.gid15 h1.GreenWord {
  margin-top: -34px;
  margin-bottom: 24px;
}
#building_list {
  direction: rtl;
  text-align: right;
}

/* build/residence.html (gid25 residence / gid26 palace) */
#build.gid25 h1.GreenWord, #build.gid26 h1.GreenWord { position: static; top: auto; margin: 0 0 8px; }
#build.gid25 .build_desc, #build.gid26 .build_desc { font-weight: 700; }
#build.gid25 #textmenu, #build.gid26 #textmenu { margin: 14px 0; }
#build.gid25 div.c, #build.gid26 div.c { color: #808080; font-size: 16px; clear: none; }
#build.gid25 #contract a.build, #build.gid26 #contract a.build { color: #71d000; }
#build.gid25 .build_details .tit a, #build.gid26 .build_details .tit a { color: #82d000; }
#build.gid25 #building_contract, #build.gid26 #building_contract { position: static; margin: 12px 0 0; z-index: auto; }

/* build/upgrade.html — Town Hall (gid24) celebration link colours */
#build.gid24 .build_details .tit a { color: #82d000; }
#build.gid24 .build_details td.act a.build { color: #71d000; }

/* village/dorf1.html */
div.village1 div#map_details { margin-top: -9px; }
div.village1 b.hover{ scale:1.2; }
