/* The box office page (Chapter Six, session 81). Loaded after cards.css,
   whose tokens, band and chart panels it uses; every rule here is the page's
   own (.hb-bo-*). A series' colour is its PLACE in the series' order - the
   palette below and boxoffice.js's are the same list. */

.bb-8-header .hb-bo-spare { min-height: 33px; box-sizing: border-box; }
.hb-bo-year { width: auto; display: inline-block; margin: 0 0 0 4px; }

.hb-bo-note { color: var(--t3); font-size: 12px; margin: 0 0 10px 0; }

.hb-bo-tall { height: 460px; }
.hb-bo-mid { height: 380px; }

.hb-bo-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px 0;
  font-size: 11px; color: var(--t2); }
.hb-bo-legend span { display: inline-flex; align-items: center; }
.hb-bo-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; }

.hb-bo-pick { display: flex; gap: 4px; margin: 0 0 8px 0; }
.hb-bo-pick button {
  background: none; border: 1px solid var(--line); color: var(--t2);
  font-size: 11px; padding: 2px 8px; cursor: pointer;
}
.hb-bo-pick button:hover { color: var(--t1); border-color: var(--t3); }
.hb-bo-pick button.hb-on { background: #2196c9; border-color: #2196c9; color: #fff; }
.hb-bo-pick button:focus { outline: none; }
.hb-bo-pick button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

/* The two tables: films down the side, weekends or marks across. */
.hb-bo-scroll { overflow-x: auto; }
.hb-bo-table { border-collapse: collapse; font-size: 11px; color: var(--t2); width: 100%; }
.hb-bo-table th, .hb-bo-table td { padding: 3px 5px; border-bottom: 1px solid var(--line);
  text-align: right; white-space: nowrap; }
.hb-bo-table thead th { color: var(--t3); font-weight: 400; }
.hb-bo-table th.hb-bo-name { text-align: left; color: var(--t1); font-weight: 400;
  position: sticky; left: 0; background: var(--surface); }
.hb-bo-table td small { display: block; font-size: 10px; color: var(--t3); }
.hb-bo-miles td { color: var(--t1); }

/* A weekend's change from the one before: up, then three depths of fall. */
.hb-bo-table td.hb-bo-up { background: rgba(128, 174, 65, .28); }
.hb-bo-table td.hb-bo-d1 { background: rgba(243, 132, 62, .14); }
.hb-bo-table td.hb-bo-d2 { background: rgba(243, 132, 62, .30); }
.hb-bo-table td.hb-bo-d3 { background: rgba(243, 132, 62, .50); }
.hb-bo-table td.hb-bo-up small, .hb-bo-table td.hb-bo-d1 small,
.hb-bo-table td.hb-bo-d2 small, .hb-bo-table td.hb-bo-d3 small { color: var(--t2); }

.hb-bo-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }
.hb-bo-dot[data-place="0"] { background: #F3843E; }
.hb-bo-dot[data-place="1"] { background: #FFD452; }
.hb-bo-dot[data-place="2"] { background: #98BEE3; }
.hb-bo-dot[data-place="3"] { background: #80AE41; }
.hb-bo-dot[data-place="4"] { background: #c9a0dc; }
.hb-bo-dot[data-place="5"] { background: #6fc2b0; }
.hb-bo-dot[data-place="6"] { background: #E8896B; }
.hb-bo-dot[data-place="7"] { background: #b9a06a; }

/* While the band's change is being fetched (boxoffice.js). */
.hb-bo-busy { opacity: .55; transition: opacity .15s; }

/* Ticket stubs (session 82): one stub per step of tickets sold, a film's
   last stub cut to the part of a step it reached. The stub is the series'
   colour by its place, as the dots are. */
.hb-bo-stubs { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content;
  gap: 6px 12px; align-items: center; font-size: 11px; }
.hb-bo-stubs .hb-bo-name { color: var(--t1); white-space: nowrap; }
.hb-bo-count { color: var(--t2); text-align: right; }
.hb-bo-tix { display: flex; flex-wrap: wrap; gap: 3px; }
.hb-bo-tix i { --stub: #a8a8a8; display: block; width: 30px; height: 17px; border-radius: 2px;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.45) 0 2px, transparent 2px 4px) 21px 0 / 1px 100% no-repeat,
    var(--stub);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 3.5px, #000 4px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 3.5px, #000 4px) right / 51% 100% no-repeat;
          mask: radial-gradient(circle at 0 50%, transparent 3.5px, #000 4px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 3.5px, #000 4px) right / 51% 100% no-repeat; }
.hb-bo-tix i.hb-bo-part { clip-path: inset(0 calc((1 - var(--part)) * 100%) 0 0); opacity: .75; }
.hb-bo-tix[data-place="0"] i { --stub: #F3843E; }
.hb-bo-tix[data-place="1"] i { --stub: #FFD452; }
.hb-bo-tix[data-place="2"] i { --stub: #98BEE3; }
.hb-bo-tix[data-place="3"] i { --stub: #80AE41; }
.hb-bo-tix[data-place="4"] i { --stub: #c9a0dc; }
.hb-bo-tix[data-place="5"] i { --stub: #6fc2b0; }
.hb-bo-tix[data-place="6"] i { --stub: #E8896B; }
.hb-bo-tix[data-place="7"] i { --stub: #b9a06a; }
