/* Shared room sheets, including the nested order confirmation. */
#canada-dialog, #canada-review {
  --sheet-ink: #102924;
  --sheet-text: #192d26;
  --sheet-muted: #51635a;
  --sheet-line: #d8dfd3;
  --sheet-paper: #f3f5ef;
  --sheet-lime: #d2f578;
  --sheet-edge: clamp(15px, 4vw, 26px);
  --sheet-top: max(12px, env(safe-area-inset-top, 0px));
  position: fixed;
  inset: 0;
  width: min(100%, 37rem);
  max-width: 100%;
  height: fit-content;
  max-height: calc(100vh - var(--sheet-top));
  max-height: calc(100dvh - var(--sheet-top));
  margin: auto auto 0;
  padding: 0;
  border: 1px solid #d4dbcf;
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  background: var(--sheet-paper);
  color: var(--sheet-text);
  box-shadow: 0 16px 70px #091e1945;
  overflow: hidden;
  font: 1rem/1.45 "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color-scheme: light;
}
#canada-dialog::backdrop, #canada-review::backdrop { background: #071b16a8; }
#canada-review::backdrop { background: #08171085; }
:is(#canada-dialog, #canada-review) :focus-visible { outline: 3px solid #55813b; outline-offset: 2px; }
:is(#canada-dialog, #canada-review) button { font: inherit; color: inherit; }
:is(#canada-dialog, #canada-review) button:disabled { cursor: not-allowed; }
.ca-a-sheet { display: flex; flex-direction: column; max-height: inherit; min-height: 0; }
.ca-a-head, .ca-a-body, .ca-a-foot {
  padding-left: max(var(--sheet-edge), env(safe-area-inset-left, 0px));
  padding-right: max(var(--sheet-edge), env(safe-area-inset-right, 0px));
}
.ca-a-head {
  flex: none; display: flex; gap: 13px; align-items: center;
  min-height: 78px; padding-top: 15px; padding-bottom: 15px;
  background: var(--sheet-ink); color: #fafcf6;
}
.ca-a-titleicon { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border: 1px solid #729064; border-radius: 13px; color: var(--sheet-lime); }
.ca-a-titleicon svg { width: 23px; height: 23px; }
.ca-a-heading { min-width: 0; }
.ca-a-head h2 { margin: 0; color: inherit; font-size: clamp(1.2rem, 4.3vw, 1.48rem); line-height: 1.25; font-weight: 760; letter-spacing: -.035em; }
.ca-a-head p { margin: 4px 0 0; color: #c6d7cb; font-size: .8rem; line-height: 1.4; }
:is(#canada-dialog, #canada-review) .ca-a-close {
  display: grid; place-items: center; flex: 0 0 44px; height: 44px; margin-left: auto;
  border-radius: 50%; background: #ffffff0d; border: 1px solid #ffffff38;
  color: #f6f9f0; font: 400 26px/1 system-ui, sans-serif;
}
.ca-a-head :focus-visible { outline-color: var(--sheet-lime) !important; }
.ca-a-body { min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding-block: 19px max(19px, env(safe-area-inset-bottom)); }
.ca-a-foot { flex: none; min-width: 0; background: #fff; padding-block: 13px max(15px, env(safe-area-inset-bottom)); border-top: 1px solid var(--sheet-line); }
.ca-a-market, .ca-a-cols { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: .82rem; color: var(--sheet-muted); }
.ca-a-state { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; color: #45564a; }
.ca-a-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #83877e; }
.ca-a-state[data-phase="open"] { color: #315c38; }
.ca-a-state[data-phase="open"]::before { background: #57842c; box-shadow: 0 0 0 3px #7d9c461b; }
.ca-a-state[data-phase="closed"]::before { background: #a26a3e; }
.ca-a-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
#canada-dialog .ca-a-tile {
  position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 2px; min-height: 57px; padding: 5px 3px; overflow-wrap: anywhere;
  background: #fff; border: 1px solid #d6ded1; border-radius: 9px; color: var(--sheet-text); line-height: 1.25;
}
#canada-dialog .ca-a-basic { background: #e8eee2; border-color: #c6d3be; }
.ca-a-tile b { font-size: 1rem; font-weight: 720; }
.ca-a-tile small { color: #526456; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.ca-a-number b { font-size: 1.12rem; line-height: 1.18; letter-spacing: -.045em; }
#canada-dialog .ca-a-tile[aria-pressed="true"] { background: var(--sheet-ink); border-color: var(--sheet-ink); color: white; }
.ca-a-tile[aria-pressed="true"] small { color: var(--sheet-lime); }
.ca-a-tile[aria-pressed="true"]::after { content: ""; position: absolute; top: 7px; right: 7px; width: 5px; height: 9px; border: solid var(--sheet-lime); border-width: 0 1.5px 1.5px 0; transform: rotate(43deg); }
.ca-a-numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ca-a-entrycap { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; line-height: 1.3; }
.ca-a-entrycap span, .ca-a-amountrow span { color: var(--sheet-muted); font-size: .86rem; }
.ca-a-entrycap strong { color: var(--sheet-ink); font-size: 1.04rem; }
.ca-a-entrycap b { color: #445c37; font-size: .85rem; }
.ca-a-amountrow { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ca-a-amountrow span { flex: none; }
#ca-a-amount {
  min-width: 0; flex: 1; height: 44px; padding: 6px 12px; background: #fff;
  border: 1px solid #a5b5a5; border-radius: 8px; color: var(--sheet-ink); font-size: 1rem;
  font-weight: 650; font-variant-numeric: tabular-nums; scroll-margin: 16px;
}
#ca-a-amount::placeholder { color: #637265; font-weight: 400; }
.ca-a-chips { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; margin-top: 6px; }
#canada-dialog .ca-a-chips button { min-width: 0; min-height: 44px; padding: 4px 0; background: #f4f6ef; border: 1px solid #d8e1d1; border-radius: 7px; color: var(--sheet-text); font-size: .9rem; font-weight: 650; }
#canada-dialog .ca-a-chips [aria-pressed="true"] { background: var(--sheet-lime); border-color: #6f914b; color: #223715; }
.ca-a-hint, .ca-a-error, .ca-a-notice { margin: 8px 0 0; font-size: .84rem; line-height: 1.5; }
.ca-a-hint, .ca-a-notice { color: var(--sheet-muted); }
.ca-a-error { color: #952f23; }
.ca-a-error:empty { display: none; }
.ca-a-betfooter, .ca-a-pair { display: flex; gap: 8px; margin-top: 10px; }
.ca-a-pair { margin: 0; }
:is(#canada-dialog, #canada-review) :is(.ca-a-primary, .ca-a-secondary) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: 9px; font-size: .94rem; line-height: 1.4; font-weight: 700;
}
:is(#canada-dialog, #canada-review) .ca-a-primary { flex: 1; background: var(--sheet-lime); color: #1a3017; border-color: #b6d86a; }
:is(#canada-dialog, #canada-review) .ca-a-secondary { background: #fff; color: #384b3d; border-color: #cad7c5; }
:is(#canada-dialog, #canada-review) .ca-a-primary:disabled { color: #62695e; background: #e1e6db; border-color: #d5dccf; opacity: 1; }
.ca-a-locked .ca-a-edit { display: none; }
.ca-a-ticket, .ca-a-profile { display: grid; padding: 17px 20px; border-radius: 12px; }
.ca-a-ticket { color: var(--sheet-ink); border-left: 4px solid #6c8c42; background: #e3efce; }
.ca-a-ticket span, .ca-a-profile span { font-size: .87rem; }
.ca-a-ticket strong, .ca-a-profile b { font-family: "Segoe UI", system-ui, sans-serif; font-size: clamp(1.65rem, 7vw, 2rem); line-height: 1.3; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ca-a-profile { background: var(--sheet-ink); color: white; }
.ca-a-profile strong { margin-bottom: 8px; overflow-wrap: anywhere; }
.ca-a-profile span { color: #cbd9cc; }
.ca-a-profile b { color: var(--sheet-lime); }
.ca-a-details { margin: 8px 0 0; }
.ca-a-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--sheet-line); }
.ca-a-details dt { flex: none; font-size: .87rem; color: var(--sheet-muted); }
.ca-a-details dd { margin: 0; max-width: 73%; text-align: right; font-size: .95rem; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere; }
.ca-a-lead, .ca-a-info p, .ca-a-info li { font-size: .94rem; line-height: 1.65; }
.ca-a-lead { margin: 0; font-weight: 650; }
.ca-a-info, .ca-a-group { margin: 19px 0 0; }
.ca-a-group h3, .ca-a-info h3 { margin: 0 0 6px; font-size: 1rem; color: var(--sheet-ink); }
.ca-a-info p { margin: 0; }
.ca-a-info ul { margin: 0; padding-inline-start: 1.15em; }
.ca-a-info li + li { margin-top: 5px; }
.ca-a-rates { width: 100%; table-layout: auto; border-collapse: collapse; background: #fff; font-size: .87rem; }
.ca-a-rates th, .ca-a-rates td { padding: 8px; border-bottom: 1px solid var(--sheet-line); text-align: right; }
.ca-a-rates thead th, .ca-a-cols { color: var(--sheet-muted); font-weight: 650; }
.ca-a-rates thead th { background: #e4eadd; }
.ca-a-rates th:first-child { text-align: left; }
.ca-a-empty { padding: 24px 10px; margin: 0; text-align: center; color: var(--sheet-muted); }
.ca-a-cols { margin-bottom: 0; padding: 0 2px 8px; border-bottom: 1px solid var(--sheet-line); }
.ca-a-history { list-style: none; margin: 0; padding: 0; }
.ca-a-history li { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; padding: 13px 0; border-bottom: 1px solid var(--sheet-line); font-size: .87rem; }
.ca-a-draw { display: inline-flex; align-items: center; gap: 5px; }
.ca-a-draw span, .ca-a-draw b { display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 4px; border-radius: 50%; font-size: .88rem; font-weight: 700; }
.ca-a-draw span { background: #e1e9d9; color: var(--sheet-text); }
.ca-a-draw b { background: var(--sheet-ink); color: var(--sheet-lime); }
.ca-a-draw i { color: #60715f; font-size: .78rem; font-style: normal; }
.ca-a-credit { margin: 12px 0 0; font-size: .82rem; color: var(--sheet-muted); }
.ca-a-credit a { color: #3c5d30; text-decoration: underline; text-underline-offset: .2em; }
.ca-a-links { margin-top: 15px; }
.ca-a-links a { display: flex; align-items: center; gap: 12px; padding: 14px 1px; border-bottom: 1px solid var(--sheet-line); color: var(--sheet-text); font-weight: 650; }
.ca-a-links a svg { color: #526e42; }
[data-view="me"] .ca-a-body > .ca-a-primary { width: 100%; }
@media (hover: hover) {
  #canada-dialog .ca-a-tile:not([aria-pressed="true"]):hover, #canada-dialog .ca-a-chips button:not(:disabled):hover { border-color: #6f905a; }
  :is(#canada-dialog, #canada-review) .ca-a-primary:not(:disabled):hover { background: #c4e96b; }
  .ca-a-links a:hover { color: #355a31; }
}
@media (min-width: 650px) {
  #canada-dialog, #canada-review { --sheet-top: 36px; border-bottom: 1px solid #d4dbcf; border-radius: 20px; margin: auto; }
  #canada-dialog:is([data-view="table"], [data-view="quick"]) { width: min(calc(100% - 40px), 55rem); }
  #canada-dialog:is([data-view="table"], [data-view="quick"]) .ca-a-sheet { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(215px, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  #canada-dialog:is([data-view="table"], [data-view="quick"]) .ca-a-head { grid-column: 1/-1; }
  #canada-dialog:is([data-view="table"], [data-view="quick"]) .ca-a-body { min-height: 0; padding: 18px; }
  #canada-dialog:is([data-view="table"], [data-view="quick"]) .ca-a-foot { padding: 19px 17px; border: 0; border-left: 1px solid var(--sheet-line); overflow-y: auto; }
  .ca-a-numbers { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .ca-a-entrycap span { flex-basis: 100%; }
  .ca-a-entrycap strong { font-size: 1.3rem; }
  .ca-a-amountrow { display: grid; gap: 5px; margin-top: 17px; }
  .ca-a-chips { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ca-a-betfooter { flex-wrap: wrap; }
  .ca-a-betfooter .ca-a-secondary { padding-inline: 10px; }
  #canada-review { max-width: min(28rem, calc(100% - 24px)); }
}
@media (max-width: 649px) and (min-width: 440px) {
  .ca-a-numbers { grid-template-columns: repeat(7, minmax(0,1fr)); }
}
@media (max-width: 359px) {
  #canada-dialog, #canada-review { --sheet-edge: 12px; }
  .ca-a-chips { gap: 3px; }
  #canada-dialog .ca-a-chips button { font-size: .84rem; }
  .ca-a-rates td, .ca-a-rates th { padding: 7px 3px; }
}
@media (max-height: 530px) {
  #canada-dialog, #canada-review { --sheet-top: 6px; }
  .ca-a-head { min-height: 54px; padding-block: 6px; }
  .ca-a-head p { margin-top: 1px; }
  .ca-a-body, .ca-a-foot { padding-block: 9px max(9px, env(safe-area-inset-bottom)); }
  .ca-a-amountrow, .ca-a-betfooter, .ca-a-hint { margin-top: 5px; }
}
@media (max-height: 460px) and (max-width: 649px) {
  .ca-a-sheet { overflow-y: auto; overscroll-behavior: contain; }
  .ca-a-body { overflow: visible; flex: none; }
}
