/* Vote4Buff (ui/vote.js): the window, reached by the tab "Täglich" at the left edge (ui/dailyhub.js, fortune.css) - scoped
   to #vote4buff. Panels like the Battle Pass (.fp, imperial.css): 1 = vote on the toplist, 2 = pick the buff, a bar with
   the time left. */

#vote4buff .win-title .vb-tic { width: 10px; height: 10px; margin-right: 3px; vertical-align: -1px; image-rendering: auto; }
#vote4buff .win-body { display: flex; flex-direction: column; gap: 4px; padding: 5px; }
#ui #vote4buff .win-body > .fp + .fp { margin-top: 0; }
/* one size with the wheel and the login bonus (imperial.css "Täglich"): on a PC the buffs take the height that is left */
html:not(.touch) #ui #vote4buff .win-body > .vb-step + .vb-step, html:not(.touch) #ui #vote4buff .vb-step + .vb-step > .fp-b { flex: 1 1 auto; display: flex; flex-direction: column; }
html:not(.touch) #ui #vote4buff .vb-grid { flex: 1 1 auto; }
/* (the taller cards: a bigger picture - 96 px art - and the contents in the middle, the Serie mark at the bottom) */
html:not(.touch) #ui #vote4buff .vb-ic { margin-top: auto; width: 50px; height: 50px; }
html:not(.touch) #ui #vote4buff .vb-ic img { width: 48px; height: 48px; }
html:not(.touch) #ui #vote4buff .vb-name { font-size: 9px; line-height: 10px; }
#vote4buff .fp-b { padding: 4px 5px 5px; }
#vote4buff .fp-h .fp-x { margin-left: auto; }
#vote4buff .fp-h .fp-x.gold { color: var(--gold); }
#vote4buff .vb-text { font-size: 7px; line-height: 9px; color: #cfc3a8; }
#vote4buff .vb-btns { margin-top: 5px; }
#vote4buff a.vb-go { display: flex; align-items: center; justify-content: center; text-decoration: none; }
#vote4buff a.vb-go.disabled { filter: grayscale(1) brightness(.6); pointer-events: none; }
#vote4buff .vb-status { min-height: 18px; margin-top: 4px; font-size: 7px; line-height: 9px; color: #b8ab90; }
#vote4buff .vb-status.gold { color: var(--gold); }
#vote4buff .vb-status.red { color: #e0604c; }
/* a step that is done (voted in this period) or not yet open steps back a little */
#vote4buff .vb-step.done .fp-t { color: #a8957a; }

/* the buffs: one card each, side by side */
#vote4buff .vb-grid { display: grid; grid-template-columns: repeat(var(--vb-n, 3), minmax(0, 1fr)); gap: 4px; }
#vote4buff .vb-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 88px;
  padding: 4px 3px 3px; border: 0; color: inherit; font: inherit; text-align: center;
  background: linear-gradient(#231d17, #15110e); box-shadow: inset 0 0 0 1px #47423a; }
#vote4buff .vb-ic { display: grid; place-items: center; width: 34px; height: 34px;
  background: radial-gradient(circle, rgba(242, 196, 90, .16), rgba(242, 196, 90, 0) 68%); }
#vote4buff .vb-ic img { display: block; width: 32px; height: 32px; image-rendering: auto; }
#vote4buff .vb-name { max-width: 100%; font-size: 8px; line-height: 9px; color: var(--gold); overflow-wrap: anywhere; }
/* each bonus: its name left (may wrap), its value right on the first line (never alone on a line) */
#vote4buff .vb-lines { display: flex; flex-direction: column; gap: 2px; width: 100%; margin-top: 1px; }
#vote4buff .vb-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 3px; text-align: left; }
#vote4buff .vb-ln { min-width: 0; font-size: 6px; line-height: 7px; color: #cfc3a8; overflow-wrap: anywhere; }
#vote4buff .vb-lv { flex: none; font-size: 7px; line-height: 7px; white-space: nowrap; color: #8ab98e; }
#vote4buff .vb-mark { min-height: 7px; margin-top: auto; font-size: 6px; line-height: 7px; color: var(--gold); }
#vote4buff .vb-card.locked .vb-ic img { filter: grayscale(.55) brightness(.75); }
#vote4buff .vb-card.locked .vb-name { color: #b39a6a; }
/* a vote is there: every card can be taken - a soft pulse (opacity only, nothing repainted) */
#vote4buff .vb-card.pickable::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px #f2c45a, inset 0 0 6px rgba(242, 196, 90, .4); animation: vb-pulse 1.6s ease-in-out infinite; }
#vote4buff .vb-card.pickable:hover { background: linear-gradient(#30271d, #1b1611); }
/* the running buff can be switched: the others can be taken - quietly, this stays open for hours */
#vote4buff .vb-card.swappable { box-shadow: inset 0 0 0 1px #8a6a2a; }
#vote4buff .vb-card.swappable:hover { background: linear-gradient(#30271d, #1b1611); box-shadow: inset 0 0 0 1px #f2c45a; }
#vote4buff .vb-card.active { background: linear-gradient(#3b2d19, #1f1810); box-shadow: inset 0 0 0 1px #f2c45a, inset 0 0 8px rgba(242, 196, 90, .25); }
#vote4buff .vb-card.flash { animation: vb-flash .9s ease-out; }
@keyframes vb-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes vb-flash { 0% { background: #6a5222; } 100% { background: linear-gradient(#3b2d19, #1f1810); } }

/* the Vote-Serie under the buffs: clover, the length and + % (gold), the hint (dim; red when it breaks within 6 hours) */
#vote4buff .vb-streak { display: flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 4px; background: rgba(242, 196, 90, .06); box-shadow: inset 0 0 0 1px #3a332a; }
#vote4buff .vb-streak > img { flex: none; width: 14px; height: 14px; image-rendering: auto; }
#vote4buff .vb-sk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#vote4buff .vb-sk-a { font-size: 7px; line-height: 9px; color: var(--gold); }
#vote4buff .vb-sk-b { font-size: 6px; line-height: 8px; color: #a8957a; }
#vote4buff .vb-streak.urgent .vb-sk-b { color: #e0604c; }
#vote4buff .vb-card.boost .vb-lv { color: #b5e08f; }

/* the bar at the bottom: the time left of the buff (gold) or until the next vote (red, like the original) */
#vote4buff .vb-bar { height: 14px; padding: 0 4px; font-size: 8px; line-height: 14px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #f0dcc0; background: linear-gradient(#5a1f19, #3a120e); box-shadow: inset 0 0 0 1px #7a2c23; }
#vote4buff .vb-bar.on { color: var(--gold); background: linear-gradient(#4a3818, #2a1f0e); box-shadow: inset 0 0 0 1px #8a6a2a; }
