/*
 * game-icons.css
 *
 * Our own class names wrapping icon assets collected from the Travian: Legends
 * public static CDN (cdn.legends.travian.com). See docs/game-icons.md for the
 * source URLs, gpack version and how to refresh this set.
 *
 * Naming: .gi-<category>[-<variant>] as the base, with tribe/unit picked by
 * extra classes (.tribeN.tN, mirroring the game's own markup) so existing
 * HTML snippets copied from the game (e.g. `unit_small tribe2 t1`) only need
 * `unit_small` swapped for `gi-unit`.
 *
 * Default size is the game's "small" asset (~16px). Add `.gi-lg` for the
 * "medium" variant where we collected one.
 */

[class^="gi-"],
[class*=" gi-"] {
  display: inline-block;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-color: transparent;
}

/* ---------------------------------------------------------------------
 * Units: 9 tribes x t1..t10 + hero + Gaul traps.
 * Sprite sheet: one column, 10 rows, one row per unit slot (t1 = row 0).
 * Small sprites: 16x16 per cell. Medium sprites (.gi-lg): 26x26 per cell.
 * ------------------------------------------------------------------- */

.gi-unit {
  width: 16px;
  height: 16px;
  background-position: 0 0;
}

.gi-unit.gi-lg {
  width: 26px;
  height: 26px;
}

.gi-unit.tribe1 { background-image: url("../img/game/units/roman_small.a4352e4c0ab5.png"); }
.gi-unit.tribe2 { background-image: url("../img/game/units/teuton_small.481b33627218.png"); }
.gi-unit.tribe3 { background-image: url("../img/game/units/gaul_small.e59553687b91.png"); }
.gi-unit.tribe4 { background-image: url("../img/game/units/nature_small.66129dc41d98.png"); }
.gi-unit.tribe5 { background-image: url("../img/game/units/natar_small.fc81780ea316.png"); }
.gi-unit.tribe6 { background-image: url("../img/game/units/egyptian_small.b7df839a899b.png"); }
.gi-unit.tribe7 { background-image: url("../img/game/units/hun_small.c764d5c66951.png"); }
.gi-unit.tribe8 { background-image: url("../img/game/units/spartan_small.fc90092b669e.png"); }
.gi-unit.tribe9 { background-image: url("../img/game/units/viking_small.138f84344daa.png"); }

.gi-unit.gi-lg.tribe1 { background-image: url("../img/game/units/roman_medium.a6a3e1c39065.png"); }
.gi-unit.gi-lg.tribe2 { background-image: url("../img/game/units/teuton_medium.aa8e2f26b65a.png"); }
.gi-unit.gi-lg.tribe3 { background-image: url("../img/game/units/gaul_medium.d5e442d83790.png"); }
.gi-unit.gi-lg.tribe4 { background-image: url("../img/game/units/nature_medium.9ee76830ce44.png"); }
.gi-unit.gi-lg.tribe5 { background-image: url("../img/game/units/natar_medium.c07f0605d5d2.png"); }
.gi-unit.gi-lg.tribe6 { background-image: url("../img/game/units/egyptian_medium.9b777b262255.png"); }
.gi-unit.gi-lg.tribe7 { background-image: url("../img/game/units/hun_medium.8ae468488b48.png"); }
.gi-unit.gi-lg.tribe8 { background-image: url("../img/game/units/spartan_medium.d75f10fa2e5b.png"); }
.gi-unit.gi-lg.tribe9 { background-image: url("../img/game/units/viking_medium.7a9bbfff04a1.png"); }

/* row picker: t1 = row 0 ... t10 = row 9 */
.gi-unit.t1  { background-position: 0 0; }
.gi-unit.t2  { background-position: 0 -16px; }
.gi-unit.t3  { background-position: 0 -32px; }
.gi-unit.t4  { background-position: 0 -48px; }
.gi-unit.t5  { background-position: 0 -64px; }
.gi-unit.t6  { background-position: 0 -80px; }
.gi-unit.t7  { background-position: 0 -96px; }
.gi-unit.t8  { background-position: 0 -112px; }
.gi-unit.t9  { background-position: 0 -128px; }
.gi-unit.t10 { background-position: 0 -144px; }

.gi-unit.gi-lg.t1  { background-position: 0 0; }
.gi-unit.gi-lg.t2  { background-position: 0 -26px; }
.gi-unit.gi-lg.t3  { background-position: 0 -52px; }
.gi-unit.gi-lg.t4  { background-position: 0 -78px; }
.gi-unit.gi-lg.t5  { background-position: 0 -104px; }
.gi-unit.gi-lg.t6  { background-position: 0 -130px; }
.gi-unit.gi-lg.t7  { background-position: 0 -156px; }
.gi-unit.gi-lg.t8  { background-position: 0 -182px; }
.gi-unit.gi-lg.t9  { background-position: 0 -208px; }
.gi-unit.gi-lg.t10 { background-position: 0 -234px; }

/* hero (not part of the tribe sprite) */
.gi-unit.hero { background-image: url("../img/game/units/hero_small.6522152bee00.png"); background-position: 0 0; }
.gi-unit.gi-lg.hero { background-image: url("../img/game/units/hero_medium.9f768c113bd3.png"); background-position: 0 0; }

/* Gaul traps (separate single-frame icons, not part of the tribe sprite) */
.gi-unit.gaul.trap { background-image: url("../img/game/units/gaul_trap_small.4ab46c8b6e2d.png"); background-position: 0 0; }
.gi-unit.gi-lg.gaul.trap { background-image: url("../img/game/units/gaul_trap_medium.778d3916ff24.png"); background-position: 0 0; }
.gi-unit.gaul.trapBroken { background-image: url("../img/game/units/gaul_trapBroken_small.2c979d030450.png"); background-position: 0 0; }
.gi-unit.gi-lg.gaul.trapBroken { background-image: url("../img/game/units/gaul_trapBroken_medium.61f3fc06ac79.png"); background-position: 0 0; }

/* ---------------------------------------------------------------------
 * Resources: wood(lumber)/clay/iron/crop + crop consumption ("free crop").
 * Default = "tiny" (~16px), .gi-lg = "small" (~26px). Natural aspect ratio
 * is kept (icons are not perfect squares in the original game either).
 * ------------------------------------------------------------------- */

.gi-res-wood  { width: 16px; height: 12px; background-image: url("../img/game/resources/lumber_tiny.5174b072b708.png"); }
.gi-res-clay  { width: 16px; height: 12px; background-image: url("../img/game/resources/clay_tiny.adecc10fbf12.png"); }
.gi-res-iron  { width: 16px; height: 12px; background-image: url("../img/game/resources/iron_tiny.255e57cde6f2.png"); }
.gi-res-crop  { width: 16px; height: 16px; background-image: url("../img/game/resources/crop_tiny.845d17c5ffff.png"); }
.gi-res-crop-consumption { width: 16px; height: 16px; background-image: url("../img/game/resources/freeCrop_tiny.122cd5acbffc.png"); }

.gi-res-wood.gi-lg  { width: 26px; height: 19px; background-image: url("../img/game/resources/lumber_small.b7e322b452c8.png"); }
.gi-res-clay.gi-lg  { width: 26px; height: 18px; background-image: url("../img/game/resources/clay_small.0e73660ab3e3.png"); }
.gi-res-iron.gi-lg  { width: 26px; height: 18px; background-image: url("../img/game/resources/iron_small.5e0ace1db44c.png"); }
.gi-res-crop.gi-lg  { width: 26px; height: 24px; background-image: url("../img/game/resources/crop_small.70a815ea1861.png"); }
.gi-res-crop-consumption.gi-lg { width: 26px; height: 24px; background-image: url("../img/game/resources/freeCrop_small.1ec2a04368cb.png"); }

/* ---------------------------------------------------------------------
 * Raid / combat result icons (16x16).
 * ------------------------------------------------------------------- */

.gi-raid-attack   { width: 16px; height: 16px; background-image: url("../img/game/combat/attack_small.842a60bdb53b.png"); }
.gi-raid-won      { width: 16px; height: 16px; background-image: url("../img/game/combat/attack_won_withoutLosses_small.422492de5e6b.png"); }
.gi-raid-won-losses { width: 16px; height: 16px; background-image: url("../img/game/combat/attack_won_withLosses_small.bca810abb54b.png"); }
.gi-raid-lost     { width: 16px; height: 16px; background-image: url("../img/game/combat/attack_lost_small.5ae558af84ef.png"); }
.gi-scout         { width: 16px; height: 16px; background-image: url("../img/game/combat/spy_small.bef71941c7ff.png"); }

/* Bounty gauge (how full the target was on last raid). */
.gi-bounty-empty      { width: 16px; height: 16px; background-image: url("../img/game/combat/bounty_empty_small.437c80e93a10.png"); }
.gi-bounty-half       { width: 16px; height: 16px; background-image: url("../img/game/combat/bounty_half_small.9a2945290bee.png"); }
.gi-bounty-full       { width: 16px; height: 16px; background-image: url("../img/game/combat/bounty_full_small.9e2ffce22bfb.png"); }
.gi-bounty-impossible { width: 16px; height: 16px; background-image: url("../img/game/combat/bounty_impossible_small.194a57bfc888.png"); }

/* ---------------------------------------------------------------------
 * Incoming movement icons (legacy "a/" gif set: attack waves 1-3, defense
 * waves 1-3 + reinforcement, all-defense). 16x16.
 * ------------------------------------------------------------------- */

.gi-move-att1    { width: 16px; height: 16px; background-image: url("../img/game/movement/att1.be5cd14b45d9.gif"); }
.gi-move-att1-cb { width: 16px; height: 16px; background-image: url("../img/game/movement/att1_colorblind.b9fe6b3f42c3.gif"); }
.gi-move-att2    { width: 16px; height: 16px; background-image: url("../img/game/movement/att2.b0bc07fd21b3.gif"); }
.gi-move-att3    { width: 16px; height: 16px; background-image: url("../img/game/movement/att3.527dd0c6eb48.gif"); }
.gi-move-def1    { width: 16px; height: 16px; background-image: url("../img/game/movement/def1.98c0341fda4a.gif"); }
.gi-move-def2    { width: 16px; height: 16px; background-image: url("../img/game/movement/def2.d947bde46ade.gif"); }
.gi-move-def3    { width: 16px; height: 16px; background-image: url("../img/game/movement/def3.2825c50f741a.gif"); }
.gi-move-def-all { width: 16px; height: 16px; background-image: url("../img/game/movement/def_all.c6f92b5f1b00.gif"); }

/* ---------------------------------------------------------------------
 * Report type icons ("iReport" legacy sprite: one column, 22 rows, 50px
 * step, 19x17 visible glyph per row). The game selects these by a numeric
 * index rather than a semantic name, and we could not confirm the exact
 * meaning of every index from static assets alone (see docs/game-icons.md).
 * Kept as a generic, indexed set; add a semantic alias here once a given
 * index's meaning is confirmed from a real report.
 * ------------------------------------------------------------------- */

.gi-report {
  width: 19px;
  height: 17px;
  background-image: url("../img/game/report/report_icons.0258719d49b3.png");
  background-position-x: 0;
}

.gi-report.gi-cb { background-image: url("../img/game/report/report_icons_colorblind.9214dd0160a1.png"); }

.gi-report.i0  { background-position-y: -3px; }
.gi-report.i1  { background-position-y: -53px; }
.gi-report.i2  { background-position-y: -103px; }
.gi-report.i3  { background-position-y: -153px; }
.gi-report.i4  { background-position-y: -203px; }
.gi-report.i5  { background-position-y: -253px; }
.gi-report.i6  { background-position-y: -303px; }
.gi-report.i7  { background-position-y: -353px; }
.gi-report.i8  { background-position-y: -403px; }
.gi-report.i9  { background-position-y: -453px; }
.gi-report.i10 { background-position-y: -503px; }
.gi-report.i11 { background-position-y: -553px; }
.gi-report.i12 { background-position-y: -603px; }
.gi-report.i13 { background-position-y: -653px; }
.gi-report.i14 { background-position-y: -703px; }
.gi-report.i15 { background-position-y: -753px; }
.gi-report.i16 { background-position-y: -803px; }
.gi-report.i17 { background-position-y: -853px; }
.gi-report.i18 { background-position-y: -903px; }
.gi-report.i19 { background-position-y: -953px; }
.gi-report.i20 { background-position-y: -1003px; }
.gi-report.i21 { background-position-y: -1053px; }

/* ---------------------------------------------------------------------
 * Tribe emblems (as used on report headers). Natural size, no sprite.
 * ------------------------------------------------------------------- */

.gi-tribe-roman    { width: 62px; height: 58px; background-image: url("../img/game/tribes/roman.32fa4c004717.png"); }
.gi-tribe-teuton   { width: 61px; height: 60px; background-image: url("../img/game/tribes/teuton.0879e02ff135.png"); }
.gi-tribe-gaul     { width: 62px; height: 62px; background-image: url("../img/game/tribes/gaul.6b302bd0441c.png"); }
.gi-tribe-egyptian { width: 62px; height: 59px; background-image: url("../img/game/tribes/egyptian.5234ceb1feb1.png"); }
.gi-tribe-hun      { width: 62px; height: 58px; background-image: url("../img/game/tribes/hun.2ba41cb39dba.png"); }
.gi-tribe-spartan  { width: 62px; height: 63px; background-image: url("../img/game/tribes/spartan.0b86b1c5f58a.png"); }
.gi-tribe-viking   { width: 61px; height: 61px; background-image: url("../img/game/tribes/viking.2894efba9aa6.png"); }
.gi-tribe-natar    { width: 62px; height: 60px; background-image: url("../img/game/tribes/natar.898182d73e8a.png"); }
.gi-tribe-nature   { width: 61px; height: 53px; background-image: url("../img/game/tribes/nature.10eb53c41740.png"); }
