/* site.css -- OUR additions on top of the 2014 theme.
 *
 * Loaded last, after dota2_2014.css and fonts.css. Nothing here overrides the original
 * layout; it styles the parts of the site that did not exist in 2014 (the ladder, the
 * hero pages, the GET DOTA funnel, the editor) plus a few small fixes where the original
 * markup assumed something we don't ship.
 *
 * Palette taken from the theme so additions don't look bolted on:
 *   page/panel bg   #1b1d1d   panel border   #272a2a
 *   body text       #969aa1   bright text    #cfcfcf   dim text  #4b4949
 *   link hover      #ffffff   rule           #2b2e2e
 *   strength #c0453d   agility #6bad4b   intelligence #4aa5c9
 */

/* --- fixes to the vendored theme --- */

/* The original showed the nav only inside the Dota client and relied on inline JS to
 * reveal it. We always want it, so undo the hidden default. */
#navBarBGRepeat { display: block !important; }

/* The theme's sub-menus and language list start hidden and were opened by jQuery. We use
 * CSS hover instead (see site.js for the keyboard path), so declare the closed state here
 * rather than inline. */
.menuSubItemList,
#languageList { display: none; }
.navItem:hover .menuSubItemList,
.navItem.open .menuSubItemList,
#languageSelector:hover #languageList,
#languageSelector.open #languageList { display: block; }
.navItem { position: relative; }
.menuSubItemList { top: 100%; left: 0; }
#languageSelector { position: relative; }
#languageList {
    position: absolute; right: 0; top: 100%; min-width: 130px;
    padding: 3px 2px; border: solid #555 1px; background-color: #111;
    text-align: left; z-index: 999999;
}
#languageList a.languageItem {
    display: block; padding: 6px 8px; color: #aaa;
    font: small Arial, Helvetica, sans-serif; text-decoration: none;
}
#languageList a.languageItem:hover { color: #fff; background-color: #555; }

/* The active nav item, which the original marked with a separate image per page. */
#navBar a.navBarItem.navBarItemOn { color: #fff; }

/* --- account controls in the nav --- */

#navAccount {
    float: right; clear: right; padding-top: 4px;
    font: 11px Arial, Helvetica, sans-serif; text-align: right;
}
#navAccount a { color: #908d8b; text-decoration: none; margin-left: 10px; }
#navAccount a:hover { color: #fff; }
.navAvatar { vertical-align: middle; margin-right: 5px; border-radius: 2px; }

/* --- shared bits --- */

.dim { color: #4b4949; }
.ok { color: #6bad4b; }
.warn { color: #c9a24a; }
.readMore {
    font: bold 11px Arial, Helvetica, sans-serif; letter-spacing: 1px;
    text-transform: uppercase; color: #969aa1; text-decoration: none;
}
.readMore:hover { color: #fff; }

.heroSection {
    margin: 26px 0 10px; padding-bottom: 6px; border-bottom: solid #2b2e2e 1px;
    font: 14px goudy_trajan_boldbold, "times new roman", serif;
    letter-spacing: 3px; text-transform: uppercase; color: #cfcfcf;
}

.notice { margin: 0 0 18px; padding: 12px 14px; border-left: solid 3px #555; background: #161818; }
.notice p { margin: 6px 0 0; }
.noticeBad { border-left-color: #c0453d; }

.bigButton, .steamButton, .dangerButton {
    display: inline-block; padding: 9px 20px; border: solid #3a3f3f 1px;
    background: #23282a; color: #cfcfcf !important;
    font: bold 12px Arial, Helvetica, sans-serif; letter-spacing: 2px;
    text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.bigButton:hover, .steamButton:hover { background: #2f3537; color: #fff !important; }
.steamButton img { vertical-align: middle; margin-right: 8px; }
.dangerButton { border-color: #5a2b28; background: #2a1817; }
.dangerButton:hover { background: #3a1e1c; }

.draftBadge {
    display: inline-block; margin-left: 8px; padding: 1px 6px;
    background: #4b3a12; color: #d8b34a;
    font: bold 10px Arial, sans-serif; letter-spacing: 1px;
}

/* The theme reserved #primary{min-height:1900px} and #mainContent{min-height:1051px} for a
 * right rail stacked with a dozen event banners (TI, Diretide, New Bloom, the comic...).
 * Our rail is four items, so those minimums pad every page with ~1200px of empty frame.
 * Keep enough height that the frame's top and bottom images don't collide on a short page.
 */
#primary { min-height: 0; }
#mainContent { min-height: 560px; }

/* --- the callout band --- */

/* The theme's #calloutHeader is a fixed 384px band that always held event key art. With no
 * art it renders as an enormous black void above every page, so collapse it to a thin
 * gradient seam and only take the full height when a page actually supplies an image. */
#calloutHeader {
    height: 34px;
    background: linear-gradient(#050606, #0b0d0d 60%, #010101);
    border-bottom: solid #1a1d1d 1px;
}
#calloutHeader[style*="background-image"] {
    height: 384px;
    border-bottom: 0;
}

/* --- right rail additions --- */

/* GET DOTA and the player count are drawn in CSS rather than using the theme's images.
 * Both of those images have Valve's own copy baked into the pixels -- "GET DOTA 2 / PLAY
 * FOR FREE ON STEAM(R)" and "UNIQUE PLAYERS IN LAST MONTH" -- which is wrong twice over
 * here: the download is ours and not Steam's, and the number underneath is who is online
 * right now, not a monthly unique count. Text in an image also can't be translated, and
 * this site has a language switcher.
 *
 * The styling deliberately copies the theme's vocabulary (dark inset panel, hairline
 * border, Goudy Trajan caps, wide letter-spacing) so it reads as part of the same design
 * rather than a patch on top of it. */
#rightColGetDotaLink {
    background-image: none;
    box-sizing: border-box;
    padding-top: 17px;
    background: linear-gradient(#3c2320, #251715 55%, #1a1211);
    border: solid #4d2f2a 1px;
    box-shadow: 0 0 6px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
    text-align: center;
    text-decoration: none;
}
#rightColGetDotaLink:hover {
    background: linear-gradient(#4a2b27, #2e1c1a 55%, #201514);
    border-color: #6b423b;
}
/* The theme's markup puts a 264x77 transparent spacer gif inside the link to give it size;
 * we set our own box, so hide the spacer and use ::before/::after for the two text lines. */
#rightColGetDotaLink img { display: none; }
#rightColGetDotaLink::before {
    content: attr(data-title);
    display: block;
    font: 21px goudy_trajan_boldbold, "times new roman", serif;
    letter-spacing: 4px; text-transform: uppercase; color: #e6ddd7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
#rightColGetDotaLink::after {
    content: attr(data-sub);
    display: block; margin-top: 5px;
    font: 9px Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase;
    color: #9c7d74;
}

/* Server reachable / not. Replaces the theme's big player-count plaque: a live number under
 * the download button would advertise the population's smallest honest figure at exactly the
 * moment someone is deciding whether to commit to a 10 GB download. Reachability is the part
 * that actually helps -- it answers "is it me or is it them". */
#serverState {
    width: 264px; margin: 0 0 10px 14px; padding: 7px 0;
    text-align: center;
    font: 10px Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase;
    border-bottom: solid #1f2222 1px;
}
#serverState .dot {
    display: inline-block; width: 7px; height: 7px; margin-right: 7px;
    border-radius: 50%; vertical-align: baseline;
}
#serverState.up { color: #6f7479; }
#serverState.up .dot { background: #6bad4b; box-shadow: 0 0 5px rgba(107, 173, 75, .8); }
#serverState.down { color: #5c5050; }
#serverState.down .dot { background: #7d3b35; }
.rightLinksTitle {
    padding: 4px 0 8px 14px;
    font: 12px goudy_trajan_boldbold, "times new roman", serif;
    letter-spacing: 3px; text-transform: uppercase; color: #8b8f95 !important;
}

/* The links panel is rebuilt rather than reused. The theme made it a fixed 275x229 box with
 * a background image that has the "DOTA LINKS" heading painted into it, and positioned each
 * link ABSOLUTELY at a per-id top offset -- five hardcoded slots for Valve's five links
 * (PlayDota, Facebook, Twitter, YouTube, Steam). Our list is shorter, so those offsets put
 * the rows on top of each other. Normal flow instead. */
#rightColDotaLinks {
    width: 275px; height: auto;
    margin: 14px 0 0 14px; padding: 0 0 8px;
    background-image: none;
    border-top: solid #262a2a 1px;
}
/* One anchor per row, containing icon + label, so the whole row is the hit target and the
 * inline SVG inherits the link's colour through currentColor. */
#rightColDotaLinks .railLink {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0;
    color: #969aa1; font: 12px Arial, Helvetica, sans-serif; text-decoration: none;
}
#rightColDotaLinks .railLink:hover { color: #fff; }

/* --- inline SVG icons --- */

.icon {
    width: 18px; height: 18px;
    flex: 0 0 18px;
    /* The 2014 palette is low-contrast; full-strength logos would shout next to it. Lift to
     * full opacity on hover along with the label. */
    opacity: .72;
    transition: opacity .1s;
}
.railLink:hover .icon, a:hover > .icon { opacity: 1; }

.steamButton .icon { width: 20px; height: 20px; flex: 0 0 20px; opacity: 1; }

/* The nav drop-down. The theme's rules make these plain text links in a dark box; add the
 * icon on the same baseline without changing the box. */
.menuSubItemList a {
    display: flex !important;
    align-items: center;
    gap: 9px;
}
.menuSubItemList .icon { width: 14px; height: 14px; flex: 0 0 14px; }

/* LADDER button, drawn instead of using rcb_leaderboards.png -- that image has the word
 * "Leaderboards" baked into it, which a bilingual site cannot use. Same treatment as GET
 * DOTA: the theme's vocabulary, with text we can translate. */
#lbLink {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    box-sizing: border-box;
    width: 262px; height: 48px;
    margin: 0 0 6px 14px;
    background: linear-gradient(#1c2022, #121516);
    background-image: none;
    border: solid #2b3032 1px;
    color: #b9bdc2;
    font: 13px goudy_trajan_boldbold, "times new roman", serif;
    letter-spacing: 3px; text-transform: uppercase; text-decoration: none;
    box-shadow: 0 0 5px 1px rgba(0, 0, 0, .75);
}
#lbLink:hover {
    background: linear-gradient(#232829, #171b1c);
    border-color: #3a4144; color: #fff;
}
#lbLink .icon { opacity: .8; }
#lbLink:hover .icon { opacity: 1; }

/* --- blog / patch notes --- */

.patchList { list-style: none; margin: 8px 0 0; padding: 0; }
.patchList li {
    padding: 7px 0; border-bottom: solid #232626 1px;
    font: 13px Arial, Helvetica, sans-serif;
}
.patchList a { color: #cfcfcf; text-decoration: none; }
.patchList a:hover { color: #fff; }
.patchDate { display: inline-block; width: 110px; color: #4b4949; font-size: 11px; }

.faq dt { margin-top: 12px; color: #cfcfcf; font-weight: bold; }
.faq dd { margin: 4px 0 0 18px; color: #969aa1; }

/* --- hero grid --- */

.heroFilter { margin: 6px 0 14px; }
#heroSearch {
    width: 240px; padding: 6px 8px; border: solid #2b2e2e 1px;
    background: #101212; color: #cfcfcf; font: 13px Arial, sans-serif;
}
.heroGroupTitle {
    margin: 20px 0 8px; padding-bottom: 5px; border-bottom: solid #2b2e2e 1px;
    font: 13px goudy_trajan_boldbold, "times new roman", serif;
    letter-spacing: 3px; text-transform: uppercase;
}
/* Stands in for the attribute icon. 6.81b keeps those inside the client's Flash .gfx
 * files rather than as loose PNGs, so there is nothing to extract -- a square in the
 * attribute's colour carries the same information. currentColor picks it up from the
 * .attr-* class already on the heading. */
.heroGroupTitle::before {
    content: ""; display: inline-block;
    width: 9px; height: 9px; margin-right: 8px;
    background: currentColor; vertical-align: baseline;
}
.attr-strength { color: #c0453d; }
.attr-agility { color: #6bad4b; }
.attr-intelligence { color: #4aa5c9; }

.heroGrid { display: flex; flex-wrap: wrap; gap: 4px; }
.heroCell {
    position: relative; display: block; width: 90px; height: 50px;
    overflow: hidden; text-decoration: none;
}
.heroCell img { display: block; width: 90px; height: 50px; opacity: .78; transition: opacity .1s; }
.heroCell:hover img { opacity: 1; }
.heroCellName {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1px 3px; background: rgba(0,0,0,.72); color: #cfcfcf;
    font: 9px Arial, sans-serif; letter-spacing: .3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.heroCell:hover .heroCellName { color: #fff; }
/* Hidden by the search box in site.js. */
.heroCell.filtered, .heroGroup.filtered { display: none; }

/* --- hero page --- */

.heroHeader { overflow: hidden; margin-bottom: 6px; }
.heroPortraitLarge { float: left; margin: 0 16px 10px 0; border: solid #2b2e2e 1px; }
.heroHype { color: #cfcfcf; font-size: 14px; line-height: 20px; }

.statTable { width: 100%; margin-top: 4px; font: 13px Arial, Helvetica, sans-serif; }
.statTable th, .statTable td { padding: 5px 8px; border-bottom: solid #232626 1px; text-align: left; }
.statTable th { width: 22%; color: #8b8f95; font-weight: normal; }
.statTable td { width: 28%; color: #cfcfcf; }
.statTable .gain { color: #4b4949; }

.ability { overflow: hidden; margin: 14px 0; padding: 12px; background: #161818; border-left: solid 3px #2b2e2e; }
.abilityUlt { border-left-color: #a8863c; }
.abilityIcon { float: left; margin: 0 12px 0 0; border: solid #2b2e2e 1px; }
.abilityBody { margin-left: 80px; }
.abilityName { color: #cfcfcf; font: bold 15px Arial, Helvetica, sans-serif; }
.abilityTag {
    margin-left: 8px; padding: 1px 5px; background: #4b3a12; color: #d8b34a;
    font: bold 9px Arial, sans-serif; letter-spacing: 1px; vertical-align: middle;
}
.abilityBehavior { margin-left: 8px; color: #6f7479; font: normal 11px Arial, sans-serif; }
.abilityDesc { margin-top: 5px; color: #969aa1; font-size: 13px; line-height: 19px; }
.abilityMeta, .abilityValues { margin-top: 7px; font: 11px Arial, sans-serif; color: #6f7479; }
.abilityMeta span, .abilityValue { display: inline-block; margin-right: 14px; }
.abilityMeta b, .abilityValue b { color: #8b8f95; font-weight: normal; }
.abilityValues { padding-top: 6px; border-top: solid #212424 1px; }
.abilityMeta .bkb { color: #c9a24a; }
.abilityNotes { margin: 8px 0 0 18px; color: #7d8288; font-size: 12px; line-height: 18px; }
.abilityLore { margin-top: 8px; color: #4b4949; font-size: 12px; font-style: italic; }

/* --- ladder --- */

.ladderTable { width: 100%; margin-top: 6px; font: 13px Arial, Helvetica, sans-serif; }
.ladderTable th {
    padding: 6px 8px; border-bottom: solid #2b2e2e 1px; text-align: left;
    color: #8b8f95; font: 11px Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase;
}
.ladderTable td { padding: 6px 8px; border-bottom: solid #1f2222 1px; color: #cfcfcf; }
.ladderTable tbody tr:hover td { background: #161818; }
.ladderTable .lRank { width: 46px; color: #6f7479; }
.ladderTable .lMMR { width: 70px; color: #fff; font-weight: bold; }
.ladderTable .lRecord, .ladderTable .lWin, .ladderTable .lGames { width: 90px; }
/* Highlight the signed-in visitor's own row -- the first thing anyone looks for. */
.ladderTable tr.meRow td { background: #1d2320; color: #fff; }
.ladderFootnote { margin-top: 12px; font-size: 11px; }

/* --- GET DOTA --- */

.getSteps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: step; }
.getStep {
    margin: 0 0 4px; padding: 16px 18px;
    background: #141616; border-left: solid 3px #232626; opacity: .55;
}
.getStep.active { opacity: 1; border-left-color: #4aa5c9; }
.getStep.done { opacity: 1; border-left-color: #6bad4b; }
.getStep h3 {
    margin: 0 0 8px; color: #cfcfcf;
    font: 13px goudy_trajan_boldbold, "times new roman", serif;
    letter-spacing: 3px; text-transform: uppercase;
}
.getStep p { margin: 6px 0; color: #969aa1; font-size: 13px; line-height: 19px; }
.signedInAs { color: #cfcfcf !important; }
.signedInAs img { vertical-align: middle; }
pre.cfg, code {
    background: #0d0f0f; border: solid #212424 1px; color: #9fb4a8;
    font: 12px/18px Consolas, "Courier New", monospace;
}
pre.cfg { margin: 10px 0; padding: 12px; overflow-x: auto; }
code { padding: 1px 4px; }

/* --- admin --- */

.adminTable { width: 100%; font: 13px Arial, Helvetica, sans-serif; }
.adminTable th { padding: 6px 8px; border-bottom: solid #2b2e2e 1px; text-align: left; color: #8b8f95; }
.adminTable td { padding: 6px 8px; border-bottom: solid #1f2222 1px; color: #cfcfcf; }
.adminTable a { color: #cfcfcf; }

.editForm label { display: block; margin: 12px 0; color: #8b8f95; font: 12px Arial, sans-serif; }
.editForm input[type=text], .editForm textarea, .editForm select,
.editForm input[type=datetime-local] {
    display: block; width: 100%; margin-top: 5px; padding: 7px 8px;
    border: solid #2b2e2e 1px; background: #101212; color: #cfcfcf;
    font: 13px/18px Arial, Helvetica, sans-serif; box-sizing: border-box;
}
.editForm textarea { font-family: Consolas, "Courier New", monospace; resize: vertical; }
/* The editor is the one page that wants more than the theme's 580px column. */
.editCols { display: flex; gap: 16px; }
.editCol { flex: 1 1 0; min-width: 0; }
.editCol h3 { margin: 14px 0 0; color: #cfcfcf; font: bold 13px Arial, sans-serif; }
.editActions { margin-top: 18px; }
.editActions .bigButton { margin-right: 8px; }
.deleteForm { margin-top: 28px; padding-top: 16px; border-top: solid #232626 1px; }
body.adminWide #mainLoop { width: 880px; }

/* Present in the markup, not painted. Used for the blog feed's h1: the 2014 design has
   nowhere to show a page heading -- the band above the content is key art and the site name
   lives inside the nav bar's logo image -- but a page still needs exactly one, for screen
   readers and for the outline a crawler builds. Clipped rather than display:none, which
   would take it out of the accessibility tree as well. */
.srOnly {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    border: 0;
}
