:root { --bqt-logo-size: 48px; }
.bqt-site-logo {
  display: block;
  width: var(--bqt-logo-size);
  height: var(--bqt-logo-size);
  max-width: 100%;
  object-fit: contain;
}
.bqt-customer-header .bqt-header-brand {
  display: flex;
  align-items: center;
  flex: 0 1 var(--bqt-logo-size);
  min-width: 0;
}
.bqt-header-brand .bqt-site-logo { height: auto; aspect-ratio: 1; }
.topbar.bqt-customer-header { min-height: calc(var(--bqt-logo-size) + 10px); }
.bqt-customer-header #menuButton { flex-shrink: 0; }
.nav-title .bqt-admin-brand { display: inline-flex; align-items: center; gap: 9px; }

/* The flag glyphs come from the same font used in the admin currency list. */
@font-face{font-family:Cairo;src:url("/currency-flags.woff2?v=1") format("woff2");font-weight:100 900;font-style:normal;font-display:swap;unicode-range:U+1F1E6-1F1FF}
@font-face{font-family:"Currency Flags";src:url("/currency-flags.woff2?v=1") format("woff2");font-weight:100 900;font-style:normal;font-display:swap;unicode-range:U+1F1E6-1F1FF}
select,option{font-family:"Currency Flags",Cairo,Arial,sans-serif}

.bqt-send-button { display:grid; place-items:center; overflow:hidden }
.bqt-send-button > span { grid-area:1/1; display:inline-flex; align-items:center; justify-content:center; gap:6px }
.bqt-send-button .shop-send-idle i { display:inline-flex; flex:none }
.bqt-send-button .shop-send-idle svg { width:18px; height:18px }
.bqt-send-button .shop-send-busy { opacity:0 }
.bqt-send-button[aria-busy="true"] { opacity:1; cursor:wait }
.bqt-send-button[aria-busy="true"] .shop-send-idle { opacity:0 }
.bqt-send-button[aria-busy="true"] .shop-send-busy { opacity:1 }
@media (prefers-reduced-motion:no-preference) {
  .bqt-send-button:not([data-send-effect="none"])[aria-busy="true"] .shop-send-idle { animation:shop-send-fade calc(320ms / var(--bqt-send-rate,1)) ease-out both }
  .bqt-send-button:is([data-send-effect="send"],:not([data-send-effect]))[aria-busy="true"] .shop-send-idle i { animation:shop-send-flight calc(320ms / var(--bqt-send-rate,1)) cubic-bezier(.22,.52,.45,1) both }
  .bqt-send-button:not([data-send-effect="none"])[aria-busy="true"] .shop-send-busy { animation:shop-send-reveal calc(200ms / var(--bqt-send-rate,1)) calc(160ms / var(--bqt-send-rate,1)) ease-out both }
}
@media (prefers-reduced-motion:no-preference) {
  .bqt-send-button[data-send-effect="lift"][aria-busy="true"] .shop-send-idle { animation-name:shop-send-lift }
}
@keyframes shop-send-lift { from { opacity:1; transform:none } to { opacity:0; transform:translateY(-10px) } }
@keyframes shop-send-flight { to { transform:translate(22px,-14px) rotate(8deg) scale(.85) } }
@keyframes shop-send-fade { from { opacity:1 } to { opacity:0 } }
@keyframes shop-send-reveal { from { opacity:0 } to { opacity:1 } }

/* Motion marks a change of state; refreshed rows and live figures stay still. */
@keyframes bqt-ui-appear {
  from { opacity: .45 }
  to { opacity: 1 }
}
@keyframes bqt-ui-reveal {
  from { opacity: .35; translate: 0 5px }
  to { opacity: 1; translate: 0 0 }
}
@keyframes bqt-ui-sync {
  to { rotate: 1turn }
}
@media screen and (prefers-reduced-motion: no-preference) {
  :where(button, a[href], input, select, textarea) {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, scale 120ms ease;
  }
  :where(button:enabled, .home-quick-actions a, .exchange-calc-link):not([aria-disabled="true"], [aria-busy="true"], [draggable="true"], [data-home-grip], .bqt-send-button):active {
    scale: .98;
  }

  /* Static containers animate when opened, even if their contents refresh later. */
  :is(.search-results.show, .dashboard-customer-results.open, .dashboard-balance-choice:not([hidden]),
      .request-decision-panel:not(.hidden), #currencyOrderEditor:not([hidden]),
      .notification-empty:not([hidden]), .shop-toast:not([hidden]), .order-toast:not([hidden]):not(:empty),
      .orders-main > section:not([hidden]), #mfaSetupPanel:not([hidden]),
      main > :is(#home, #detail, #history, #historyReceipt):not([hidden]),
      #exchangeContent:not([hidden]), #historyDates:not([hidden]), #customDates:not([hidden]),
      .auth-layout #loginBox:not([hidden]), .login-shell :is(#factorStep, #verifyCode, #recoveryStep):not([hidden])) {
    animation: bqt-ui-reveal 170ms ease-out;
  }

  :is(.category-modal, .currency-modal, .method-modal, .confirm-modal, .request-modal,
      .customer-data-modal, .password-modal, .critical-modal, .reset-history-modal,
      .group-modal, .manager-modal, .settings-api-modal).open > :first-child,
  dialog[open]:not(.shop-sheet) {
    animation: bqt-ui-reveal 190ms cubic-bezier(.2,.75,.3,1);
  }
  dialog[open]:not(.shop-sheet)::backdrop { animation: bqt-ui-appear 150ms ease-out }
  :is(#dashboardProviderSync, #syncAllApiProviders)[aria-busy="true"] > :is(i, svg, .material) {
    animation: bqt-ui-sync 850ms linear infinite;
  }
}
@media screen and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.stat-link, .watch-balance-card, a.method, .home-quick-actions > :is(a, button)) {
    transition: translate 150ms ease-out, background-color 140ms ease, border-color 140ms ease, scale 120ms ease;
  }
  :is(.stat-link, .watch-balance-card, a.method, .home-quick-actions > :is(a, button)):not(:disabled):hover {
    translate: 0 -2px;
  }
}
@media screen and (prefers-reduced-motion: reduce) {
  /* Also suppress older decorative transitions when the device requests it. */
  *, *::before, *::after, dialog::backdrop {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
