/* The Drachenspiele (ui/fest.js): the window #fest, the call #fest-call, the round #fest-hud, #fest-banner, #fest-result.
   The tab at the left edge is an .edge-tab (fortune.css). Everything under its id: the prefixes of other windows are short. */
/* In the ring only what the round needs (Nutzer 07.11.2026: windows lay over each other): no quests, world boss, events, menu; while it runs no chat, and no action bar where nobody strikes */
#ui.in-fest #quest-tracker, html.touch #ui.in-fest #quest-tracker, #ui.in-fest #travel-btn, #ui.in-fest #wb-timer, #ui.in-fest #wb-call, #ui.in-fest #ev-box, #ui.in-fest #menubar, #ui.in-fest #wallet, #ui.in-fest #autopill, #ui.in-fest #edge { display: none; }
#ui.in-fest.fest-play #chat, #ui.in-fest.fest-noact #actionbar, #ui.in-fest.fest-noact #tpad { display: none; }
/* (it keeps its place: TouchPad.layout measures the HUD down to it) */
#ui.in-fest.fest-play #tleft { visibility: hidden; }

/* the window */
#fest .fe-body { display: flex; flex-direction: column; gap: 4px; }
#fest .fe-page { display: flex; flex-direction: column; gap: 4px; height: 262px; overflow-y: auto; }
#fest .fe-banner { position: relative; flex: none; height: 62px; overflow: hidden; box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze); }
#fest .fe-bimg { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
#fest .fe-next { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px; align-items: center; padding: 2px 5px 3px;
  background: linear-gradient(180deg, rgba(12, 9, 7, 0), rgba(12, 9, 7, .92) 40%); }
#fest .fe-next img { width: 22px; height: 22px; image-rendering: auto; }
#fest .fe-nt { min-width: 0; }
#fest .fe-cap { font-size: 6px; line-height: 7px; color: var(--dim); }
#fest .fe-name { font-size: 11px; line-height: 12px; color: #ffe2a0; text-shadow: 0 1px 0 #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fest .fe-time { font-size: 13px; line-height: 14px; color: var(--gold); text-shadow: 0 1px 0 #000; }
#fest .fe-go { flex: none; }
#fest .fe-wallet { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1px 6px; padding: 2px 4px; font-size: 8px; line-height: 12px;
  background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#fest .fe-val, #fest-result .fe-val { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
#fest .fe-val img, #fest-result .fe-val img { width: 11px; height: 11px; image-rendering: auto; }
#fest .fe-hint { flex: none; font-size: 7px; line-height: 8px; color: var(--dim); padding: 0 2px; }
#fest .fe-games { display: flex; flex-direction: column; gap: 2px; }
#fest .fe-game { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px; padding: 3px 4px; background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#fest .fe-game > img { width: 22px; height: 22px; image-rendering: auto; }
#fest .fe-gname { display: flex; justify-content: space-between; gap: 4px; font-size: 9px; line-height: 10px; color: var(--gold); }
#fest .fe-score { flex: none; font-size: 6px; color: var(--dim); }
#fest .fe-gdesc { margin-top: 1px; font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#fest .fe-ptitle { flex: none; font-size: 9px; line-height: 10px; padding: 1px 2px 0; }
#fest .fe-prizes { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 4px; padding: 2px 3px; background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#fest .fe-prize { display: flex; align-items: center; gap: 3px; min-width: 0; font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#fest .fe-prize > span { min-width: 0; }
#fest .fe-lic { flex: none; width: 12px; height: 12px; image-rendering: auto; }

/* the call: the look of the world boss (social.css #wb-call), in the gold of the games */
#fest-call { position: absolute; left: 50%; top: 106px; transform: translateX(-50%); width: 200px; padding: 5px 7px 6px; z-index: 6;
  background: linear-gradient(180deg, rgba(120, 76, 14, .5), rgba(20, 12, 10, .2) 60%), var(--panel, #17110d);
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #c9973f, inset 0 0 0 2px var(--edge), 0 0 10px rgba(255, 190, 70, .4);
  animation: fest-call-in .45s ease-out; }
#fest-call.hidden { display: none; }
#fest-call .wc-top { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 5px; align-items: center; }
#fest-call .wc-emb { width: 26px; height: 26px; object-fit: contain; image-rendering: auto; }
#fest-call .wc-head { min-width: 0; }
#fest-call .wc-kick { font-size: 6px; line-height: 7px; letter-spacing: 1px; text-transform: uppercase; color: #ffc35a; }
#fest-call .wc-name { font-size: 11px; line-height: 11px; color: #ffe2a0; overflow-wrap: anywhere; text-shadow: 0 1px 0 #000; }
#fest-call .wc-time { text-align: right; min-width: 36px; }
#fest-call .wc-tl { font-size: 6px; line-height: 7px; color: var(--dim); white-space: nowrap; }
#fest-call .wc-t { font-size: 15px; line-height: 15px; color: var(--gold); text-shadow: 0 1px 0 #000; }
#fest-call .wc-sub { margin-top: 3px; font-size: 7px; line-height: 8px; color: #e8dcc4; overflow-wrap: anywhere; }
#fest-call .wc-btns { gap: 4px; margin-top: 5px; }
@keyframes fest-call-in { from { opacity: 0; translate: 0 -8px; scale: 1.06; } }
#ui.compact #fest-call { top: 48px; }

/* during a round */
#fest-hud { position: absolute; right: 4px; top: 111px; width: 128px; padding: 3px 4px 4px; display: flex; flex-direction: column; gap: 2px; }
#fest-hud.hidden { display: none; }
#fest-hud .fe-hhead { display: flex; align-items: center; gap: 3px; font-size: 8px; line-height: 10px; }
#fest-hud .fe-hhead img { flex: none; width: 12px; height: 12px; image-rendering: auto; }
#fest-hud .fe-htitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fest-hud .fe-hclock { flex: none; }
#fest-hud .fe-hclock.warn { color: #ff8a72; }
#fest-hud .fe-hline { font-size: 7px; line-height: 8px; overflow-wrap: anywhere; }
#fest-hud .fe-wards { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; border-top: 1px solid rgba(90, 72, 52, .45); }
#fest-hud .fe-ward { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 3px; align-items: center; font-size: 6px; line-height: 7px; }
#fest-hud .fe-ward.gone { opacity: .45; text-decoration: line-through; }
#fest-hud .fe-wn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fest-hud .fe-wbar { height: 4px; }
#fest-hud .fe-rows { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; border-top: 1px solid rgba(90, 72, 52, .45); }
#fest-hud .fe-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 3px; font-size: 7px; line-height: 8px; padding: 0 2px; }
#fest-hud .fe-row.me { color: var(--gold); background: rgba(58, 44, 18, .45); }
#fest-hud .fe-rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fest-hud .fe-hint { font-size: 6px; line-height: 7px; color: var(--dim); overflow-wrap: anywhere; }
#ui #fest-hud .fe-hbtn { display: block; margin-top: 1px; }
#ui #fest-hud .fe-hbtn .btn { width: 100%; }

#fest-banner { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 6500; }
#fest-banner.hidden { display: none; }
#fest-banner .fe-bsub { font-size: 10px; line-height: 11px; color: #f3e6c4; text-shadow: 1px 1px 0 #000, 0 0 4px #000; white-space: nowrap; }
#fest-banner .fe-bbig { font-size: 30px; line-height: 30px; color: var(--gold); text-shadow: 2px 2px 0 #000, 0 0 6px rgba(242, 196, 90, .45); animation: fest-pop .3s ease-out; }
#fest-banner.tile { top: 8%; }
#fest-banner.tile .fe-bbig { font-size: 20px; line-height: 21px; }
#fest-banner.wait .fe-bsub { padding: 2px 8px; font-size: 8px; line-height: 10px; background: rgba(14, 11, 9, .78); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze); text-shadow: none; }
@keyframes fest-pop { from { scale: 1.4; opacity: .4; } }

/* the end */
#fest-result { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); width: min(264px, calc(100% - 8px)); padding: 6px 8px 7px; z-index: 7000; display: flex; flex-direction: column; gap: 3px; }
#fest-result.hidden { display: none; }
#fest-result .fe-rtitle { text-align: center; font-size: 12px; line-height: 13px; text-shadow: var(--ol); }
#fest-result .fe-rmine { text-align: center; font-size: 9px; line-height: 10px; color: #fff3d1; overflow-wrap: anywhere; }
#fest-result .fe-rsub { text-align: center; font-size: 7px; line-height: 8px; }
#fest-result .fe-rtab { display: flex; flex-direction: column; gap: 1px; max-height: 92px; overflow-y: auto; padding: 2px 3px; background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#fest-result .fe-rrow { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px; align-items: center; font-size: 8px; line-height: 10px; }
#fest-result .fe-rrow.me { color: var(--gold); }
#fest-result .fe-rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fest-result .fe-rgain { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 10px; font-size: 8px; line-height: 11px; }
#fest-result .fe-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
#fest-result .fe-card { flex: 0 0 76px; min-height: 58px; padding: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 7px; line-height: 8px;
  background: linear-gradient(180deg, #1c1814, #110e0c); box-shadow: inset 0 0 0 1px #47423a; }
#fest-result .fe-card.back { color: var(--text); border: 0; font-family: inherit; box-shadow: inset 0 0 0 1px var(--gold-d), 0 0 4px rgba(255, 190, 70, .35); }
#fest-result .fe-card.back:hover:not(:disabled) { filter: brightness(1.2); }
#fest-result .fe-card.back:disabled { filter: grayscale(.8) brightness(.7); }
#fest-result .fe-card.back > img { width: 28px; height: 28px; image-rendering: auto; }
#fest-result .fe-card.open { animation: fest-pop .25s ease-out; box-shadow: inset 0 0 0 1px var(--gold); }
#fest-result .fe-ckey { display: inline-flex; align-items: center; gap: 2px; }
#fest-result .fe-ckey img { width: 9px; height: 9px; image-rendering: auto; }
#fest-result .fe-cline { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 8px; line-height: 9px; color: #fff3d1; overflow-wrap: anywhere; }
#fest-result .fe-cline > span { max-width: 100%; }
#fest-result .fe-lic { flex: none; width: 26px; height: 26px; image-rendering: auto; }
#fest-result .fp-note { text-align: center; }
#fest-result .fe-rwait { text-align: center; font-size: 7px; line-height: 8px; color: var(--dim); }
