/* Eagle panel — small additions on top of AdminLTE 4. */

@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../vendor/fonts/cairo-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../vendor/fonts/cairo-arabic-600-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('../vendor/fonts/cairo-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../vendor/fonts/cairo-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../vendor/fonts/cairo-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('../vendor/fonts/cairo-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bs-body-font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

/* Amounts, ids and dates line up in tables. */
.table td,
.small-box h3,
.info-box-number {
  font-variant-numeric: tabular-nums;
}

/* Left-to-right fragments (amounts, emails, ids) inside RTL pages. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.detail-table th {
  width: 35%;
  font-weight: 600;
  color: var(--bs-secondary-color);
}

/*
 * Long URLs and tokens break anywhere: "break-word" does not lower a table's minimum width, so an
 * unbroken webhook URL would widen the page on a phone. Set on the cell's children too: Bootstrap
 * gives <code> and .text-break (!important) their own "break-word".
 */
.detail-table td,
.detail-table td *,
.table-wrap td,
.table-wrap td * {
  overflow-wrap: anywhere !important;
}

.detail-table pre,
.cell-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.85rem;
}

.grid-actions {
  white-space: nowrap;
}

/*
 * The scroller must hold the absolutely positioned bits of its table (.visually-hidden labels):
 * otherwise they belong to the card, escape the clipping and, in RTL, widen the whole page on a
 * phone, so the page scrolls sideways and the off-canvas sidebar shows as if fixed.
 */
.table-responsive {
  position: relative;
}

.table th a.sort-link {
  color: inherit;
  text-decoration: none;
}

/* Auth pages: the QR code needs a light background in dark mode too. */
.qr-box {
  display: flex;
  justify-content: center;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.qr-box svg {
  width: 220px;
  height: 220px;
}

/* QR code of an account to pay to (withdrawal payout): scanned with the wallet app. */
.qr-box.qr-box-sm {
  display: inline-flex;
}

.qr-box.qr-box-sm svg {
  width: 160px;
  height: 160px;
}

.code-input {
  font-size: 1.5rem;
  letter-spacing: 0.4rem;
  text-align: center;
  direction: ltr;
}

/* Admin "add bot" guide: readable step lists next to the form. */
.guide-list > li + li {
  margin-top: 0.4rem;
}

.bot-guide .accordion-button {
  font-weight: 600;
}

/* Technical support: inbox rows and chat bubbles (customer at the start, accountant at the end). */
.support-row-unread {
  background: var(--bs-primary-bg-subtle);
}

.support-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  font-size: 1.25rem;
}

.min-w-0 {
  min-width: 0;
}

.support-thread {
  height: min(60vh, 36rem);
  overflow-y: auto;
  background: var(--bs-tertiary-bg);
}

.support-msg {
  display: flex;
  margin-bottom: 0.6rem;
}

.support-msg-in {
  justify-content: flex-start;
}

.support-msg-out {
  justify-content: flex-end;
}

.support-bubble {
  max-width: min(80%, 32rem);
  padding: 0.5rem 0.75rem;
  border-radius: 0.9rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: 0 1px 1px rgb(0 0 0 / 5%);
}

.support-msg-out .support-bubble {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
}

.support-text {
  white-space: normal;
  word-break: break-word;
}

.support-meta {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.support-photo {
  display: block;
  max-width: 100%;
  max-height: 18rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
}

.support-audio {
  max-width: 100%;
}

.support-bell-menu {
  min-width: 18rem;
}

.support-bell-item {
  white-space: normal;
}

/* Account statement: printable on its own (no panel chrome, every column visible). */
@media print {
  .app-sidebar,
  .app-header,
  .app-footer,
  .app-content-header,
  .no-print,
  .toast-container,
  .alert-dismissible {
    display: none !important;
  }

  .app-main,
  .app-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }

  .statement-table {
    font-size: 11px;
  }

  .statement-table .d-none {
    display: table-cell !important;
  }
}

/* Installed app (public/js/pwa.js): no link previews or "open in Safari" callouts on iPhone. */
.pwa-standalone a {
  -webkit-touch-callout: none;
}

/*
 * Dialogs: AdminLTE's reduced-motion rule (.fade { opacity: 1 !important }) would turn the dim
 * backdrop solid black on devices with "reduce motion" on.
 */
.modal-backdrop.show {
  opacity: var(--bs-backdrop-opacity) !important;
}

/* Corner button to install the app (layout/_pwa_install.html.twig), under dialogs and alerts. */
.pwa-install-fab {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  inset-inline-end: 1rem;
  z-index: 1035;
}

.cash-panel { max-width: 960px; margin-inline: auto; }
.cash-header { background: #dc2028; color: #fff; }
.cash-balance { background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); }
.cash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cash-tile { display: flex; min-height: 132px; padding: 1rem .6rem; gap: .65rem; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--bs-body-color); text-decoration: none; border-bottom: 1px solid var(--bs-border-color); border-inline-end: 1px solid var(--bs-border-color); }
.cash-tile .bi { font-size: 2.25rem; color: #dc2028; }
a.cash-tile:hover, a.cash-tile:focus-visible { background: var(--bs-tertiary-bg); color: #b5161d; }
a.cash-tile:focus-visible { outline: 3px solid #dc2028; outline-offset: -3px; }
.cash-unavailable .bi { color: var(--bs-secondary-color); }
.cash-tile small { font-size: .72rem; }
@media (max-width: 420px) { .cash-tile { min-height: 142px; font-size: .82rem; } .cash-tile .bi { font-size: 1.8rem; } }
