/* Additions to legacy common.css: hero animation (ex-Flash), forms, news, lightbox. */
body { margin: 0; }
img { border: 0; }

/* ---- Hero (replaces swf/body.swf) ------------------------------------- */
.hero { position: relative; width: 350px; height: 300px; overflow: hidden; }
.hero__frame { position: absolute; inset: 0; display: block; }
.hero__light { opacity: 0; }
.hero.is-ready .hero__light { animation: hero-light 4s ease-in-out 0.6s infinite; }
.hero.is-ready .hero__base { animation: hero-in 0.6s ease-out both; }
.hero__spark { position: absolute; display: none; pointer-events: none; }
@keyframes hero-light { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes hero-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero.is-ready .hero__light, .hero.is-ready .hero__base { animation: none; }
}

/* ---- Forms -------------------------------------------------------------- */
.bw-form { max-width: 420px; }
.bw-form--wide { max-width: 640px; }
.bw-form fieldset { border: 1px solid #6b5a3a; margin: 0 0 12px; padding: 8px 12px; }
.bw-form legend { font-weight: bold; padding: 0 6px; }
.bw-form label { display: block; margin: 8px 0; }
.bw-form label.check { display: flex; gap: 6px; align-items: baseline; }
.bw-form input:not([type=radio]):not([type=checkbox]):not([type=image]),
.bw-form select, .bw-form textarea { display: block; margin-top: 3px; padding: 3px 5px; font: inherit; box-sizing: border-box; }
.bw-form input:not([type=radio]):not([type=checkbox]):not([type=image]), .bw-form textarea { width: 100%; }
.bw-form select { display: inline-block; }
.bw-form .w-num { width: 70px !important; display: inline-block !important; }
.bw-form .w-year { width: 90px !important; display: inline-block !important; }
.bw-form .radio { margin-right: 14px; }
.bw-form button { padding: 4px 18px; font: inherit; font-weight: bold; cursor: pointer; }
.bw-form button:disabled { opacity: .6; cursor: wait; }
.hint { font-size: 11px; color: #8a7a5a; margin: 2px 0 6px; }
.hint.ok { color: #2a7a2a; } .hint.bad, .field-error { color: #c00; }
.field-error { display: block; font-size: 11px; }
.msg { padding: 6px 10px; border: 1px solid; }
.msg--error { color: #900; border-color: #c66; background: #fbeaea; }
.msg--ok { color: #255a25; border-color: #6a6; background: #eaf6ea; }
.captcha { display: block; margin: 4px 0; cursor: pointer; }
.race-profile { margin: 4px 0 10px; padding: 6px 10px; border-left: 3px solid #a08040; font-size: 11px; }
.red { color: #c00; }
form.inline { display: inline; }
button.link { background: none; border: 0; padding: 0; color: #900; text-decoration: underline; cursor: pointer; font: inherit; }
.badge-icon { vertical-align: middle; margin-left: 2px; }

/* ---- News --------------------------------------------------------------- */
.news-item { margin: 0 0 18px; }
.news-item h2 { margin: 0 0 4px; }
.news-meta { font-size: 11px; color: #7a6a4a; margin: 3px 0; }
.comment { border-top: 1px dotted #a08a5a; padding: 6px 0; }
.pager { margin: 10px 0; } .pager a, .pager b { margin-right: 6px; }

/* ---- Lightbox (replaces popImage popups) -------------------------------- */
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); display: flex;
  align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 92vh; box-shadow: 0 0 30px #000; }

/* ---- Character sheet ---------------------------------------------------- */
.sheet h1 { margin-top: 0; }
.sheet__head td { padding: 1px 10px 1px 0; }
.sheet__head td:first-child { color: #7a6a4a; }
.vbar { position: relative; height: 16px; margin: 4px 0; max-width: 360px; background: #3a2e1c; border: 1px solid #6b5a3a; }
.vbar__fill { position: absolute; inset: 0 auto 0 0; transition: width 1s linear; }
.vbar--life .vbar__fill { background: linear-gradient(#d44, #922); }
.vbar--manna .vbar__fill { background: linear-gradient(#58c, #237); }
.vbar--hungry .vbar__fill { background: linear-gradient(#cb6, #874); }
.vbar__text { position: relative; padding-left: 6px; font-size: 11px; color: #fff; text-shadow: 0 0 2px #000; line-height: 16px; }
.sheet__cols { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 10px 0; }
.sheet__stats caption { text-align: left; font-weight: bold; padding: 4px 0; }
.sheet__stats td { padding: 0 8px 0 0; font-size: 11px; }
.sheet__stats .num { text-align: right; white-space: nowrap; }
.bonus { color: #2a7a2a; margin-left: 3px; }
.items { padding-left: 18px; }
button.plus { width: 16px; height: 16px; padding: 0; line-height: 14px; font-weight: bold; cursor: pointer;
  border: 1px solid #6b5a3a; background: #e8d6a8; color: #5a3a00; }
.item-params { display: block; font-size: 10px; color: #6b5a3a; }
.item-params--need { color: #8a4a2a; }
.items li { margin-bottom: 4px; }
.items .link { margin-left: 6px; }

/* ---- Game screen ---------------------------------------------------------- */
.game { display: flex; gap: 22px; align-items: flex-start; }
.game__side { flex: 0 0 230px; }
.game__side .vbar { max-width: 230px; }
.game__me { margin-bottom: 6px; font-weight: bold; }
.game__links { margin-top: 8px; }
.game__main { flex: 1; min-width: 0; }
.game__place { margin: 0 0 6px; }
.game__desc { font-style: italic; }
.exits { display: flex; flex-wrap: wrap; gap: 6px; }
button.exit { padding: 6px 12px; font: bold 12px Tahoma, sans-serif; cursor: pointer; color: #f2d58a;
  background: linear-gradient(#5a4528, #2e2214); border: 1px solid #a08040; border-radius: 3px; }
button.exit:hover { color: #fff; border-color: #e0c070; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 10px; }
.tabs a.is-active { font-weight: bold; text-decoration: none; color: #000; }
table.shop { border-collapse: collapse; width: 100%; }
table.shop td { padding: 3px 6px; border-bottom: 1px dotted #b49a64; vertical-align: top; }
table.shop .num { white-space: nowrap; text-align: right; }
input.qty { width: 50px; }
table.shop form { white-space: nowrap; }
table.shop input.qty { display: inline-block; width: 46px; padding: 1px 3px; }

/* "i" button next to a nick: information about the character */
a.badge-info, .g a.badge-info, .mf a.badge-info { display: inline-block; width: 13px; height: 13px; margin-left: 4px; vertical-align: -1px;
  border-radius: 50%; text-align: center; text-decoration: none; cursor: pointer;
  font: bold 10px/13px Georgia, 'Times New Roman', serif; font-style: italic; color: #fff;
  background: #2a5d9a; box-shadow: 0 0 0 1px #0d2b4f, inset 0 1px 0 rgba(255, 255, 255, .35); }
a.badge-info--w, .g a.badge-info--w, .mf a.badge-info--w { background: #9a2a6a; box-shadow: 0 0 0 1px #4f0d33, inset 0 1px 0 rgba(255, 255, 255, .35); }
a.badge-info:hover, .g a.badge-info:hover, .mf a.badge-info:hover { color: #222; background: #ffd700; box-shadow: 0 0 0 1px #8a6d00; }
/* in the game: colour of the chosen race skin; centred on the nick */
.g a.badge-info, .g a.badge-info--w, .mf a.badge-info, .mf a.badge-info--w { vertical-align: middle; position: relative; top: -1px;
  background: var(--c, #2a5d9a); box-shadow: 0 0 0 1px var(--c-dark, #0d2b4f), inset 0 1px 0 rgba(255, 255, 255, .35); }
.g a.badge-info:hover, .mf a.badge-info:hover { color: #222; background: #ffd700; box-shadow: 0 0 0 1px #8a6d00; }
