/* 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;
}

/*
 * Phones: a label beside its value in a 35% column wrapped the labels over three or four lines, so
 * each row of a .detail-table-stack becomes one line holding the label at the start and the value
 * at the end, like a receipt. A value too long for the room the label leaves (an address, a pasted
 * text) moves under its label, full width, and starts where the label starts: the inner paddings
 * are set with !important, like the .ps-3 / .pe-3 utilities that give the outer ones, and over
 * AdminLTE's 1.5rem on the cells of a table in a .card-body.p-0. Rows a page leaves out on phones
 * (.detail-row-empty) are hidden, and the lines between rows skip them.
 */
@media (max-width: 575.98px) {
  .detail-table-stack,
  .detail-table-stack > tbody {
    display: block;
    width: auto;
  }

  .detail-table-stack > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.75rem;
    row-gap: 0.125rem;
    padding-block: 0.375rem;
    background-color: var(--bs-table-bg);
  }

  .detail-table-stack > tbody > tr:not(.detail-row-empty) ~ tr:not(.detail-row-empty) {
    border-top: var(--bs-border-width) solid var(--bs-table-border-color);
  }

  .detail-table-stack > tbody > tr.detail-row-empty {
    display: none;
  }

  .detail-table-stack > tbody > tr > th,
  .detail-table-stack > tbody > tr > td {
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding-block: 0;
    border-bottom-width: 0;
  }

  .detail-table-stack > tbody > tr > th {
    flex: 1 1 auto;
    padding-inline-end: 0 !important;
    font-size: 0.8125rem;
  }

  .detail-table-stack > tbody > tr > td {
    flex: 0 1 auto;
    margin-inline-start: auto;
  }

  .detail-table-stack > tbody > tr > td.pe-3 {
    padding-inline-start: 1rem !important;
  }

  .detail-table-stack > tbody > tr > td.pe-0 {
    padding-inline-start: 0 !important;
  }
}

.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;
}

/*
 * The account to pay to when it is a long address (ShamCash: 32 characters): as large as a short
 * one (.fs-5) from 576px up, smaller on a phone so that it keeps to one line there.
 */
.payout-account-long {
  font-size: clamp(0.75rem, 3.9vw, 1.25rem);
}

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

/* Profile picture (layout/_avatar.html.twig): always a circle, never stretched. */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--bs-secondary-bg);
}

/* 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;
}

/* Notification bell and «Notifications» page (accountant/notification_center). */
.notification-bell-menu {
  width: 24rem;
  max-width: calc(100vw - 1rem);
}

.notification-bell-list {
  max-height: min(65vh, 30rem);
  overflow-y: auto;
}

.notification-bell-list .notification-item {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.notification-bell-list .notification-item + .notification-item {
  border-top: 1px solid var(--bs-border-color-translucent);
}

.notification-unread {
  background-color: var(--bs-primary-bg-subtle);
}

.notification-dot {
  flex: 0 0 0.5rem;
  height: 0.5rem;
  margin-top: 0.45rem;
  border-radius: 50%;
}

.notification-unread .notification-dot {
  background-color: var(--bs-primary);
}

.notification-text {
  min-width: 0;
}

.notification-body {
  white-space: pre-line;
}

.notification-bell-list .notification-body {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.notification-bell-ring {
  animation: notification-bell-ring 0.9s ease-in-out;
  transform-origin: 50% 0;
}

@keyframes notification-bell-ring {
  0%, 100% { transform: rotate(0); }
  15%, 45%, 75% { transform: rotate(14deg); }
  30%, 60%, 90% { transform: rotate(-14deg); }
}

@media (prefers-reduced-motion: reduce) {
  .notification-bell-ring {
    animation: none;
  }
}

/* Phones: the list spans the screen under the navbar instead of hanging off the bell. */
@media (max-width: 575.98px) {
  #notification-bell {
    position: static;
  }

  .app-header .navbar-nav .notification-bell-menu[data-bs-popper] {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    max-width: none;
  }
}

/* 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;
}

/*
 * Auth screens (layout/auth.html.twig): brand artwork behind the card. The template hands the file
 * over in --login-bg so the URL still goes through Twig's asset(). The scrim on top of it keeps the
 * card and the corner toggles readable whatever the artwork happens to show.
 */
.login-page-bg {
  background-color: #1a1a1a;
  background-image: linear-gradient(rgba(10, 10, 10, 0.55), rgba(10, 10, 10, 0.55)), var(--login-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.login-page-bg .login-box .card {
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
}

/* The toggles sit straight on the artwork, where the body link colour has no contrast left. */
.login-page-bg .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.login-page-bg .nav-link:hover,
.login-page-bg .nav-link:focus {
  color: #fff;
}

/*
 * The bar at the top of the public home page (security/_login_bar.html.twig, DESIGN.md §9.31). Like
 * the corner toggles of the plain login page it sits on dark artwork, so it stays light on dark in
 * both themes. On phones the bot and channel names scroll sideways on one line.
 */
.login-bar {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.9rem;
  background: rgba(10, 10, 10, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.login-bar-main {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0.75rem;
}

.login-bar-facts {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  min-width: 0;
}

.login-bar-fact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.login-bar-fact > .bi {
  color: #ffc107;
}

.login-bar-fact-label,
.login-bar-group-label {
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.login-bar-value {
  color: #fff;
  overflow-wrap: anywhere;
}

.login-bar-doc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.7rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(13, 110, 253, 0.9);
  border-radius: 50rem;
}

.login-bar-doc:hover,
.login-bar-doc:focus-visible {
  color: #fff;
  background: #0b5ed7;
}

.login-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  white-space: nowrap;
  background: #ffc107;
  border-radius: 50rem;
}

.login-bar-cta:hover,
.login-bar-cta:focus-visible {
  color: #1a1a1a;
  background: #ffcd39;
}

.login-bar-contacts {
  gap: 0.15rem;
}

.login-bar-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.login-bar-contact:hover,
.login-bar-contact:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
}

.login-bar-tools {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.login-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  padding: 0.4rem 0.75rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-bar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.login-bar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.login-bar-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.1rem 0.65rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50rem;
}

.login-bar-chip:hover,
.login-bar-chip:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.login-bar-chip-handle {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 575.98px) {
  .login-bar {
    font-size: 0.85rem;
  }

  .login-bar-main {
    align-items: flex-start;
  }

  .login-bar-links {
    flex-direction: column;
    gap: 0.4rem;
  }

  .login-bar-chips {
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

/*
 * The public home page (security/_landing.html.twig, DESIGN.md §9.31): the hero on the login
 * artwork with the login card, then sections in the page's own colours (light or dark theme).
 */
.landing-page {
  min-height: 100vh;
  background: var(--bs-body-bg);
}

/* Above the hero the bar has no artwork behind it: solid dark, and its toggles light. */
.landing-page .login-bar {
  background: #121212;
  backdrop-filter: none;
}

.login-bar .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.login-bar .nav-link:hover,
.login-bar .nav-link:focus {
  color: #fff;
}

.landing-hero {
  padding-block: 2.5rem 3rem;
}

.landing-hero-text {
  color: #fff;
}

.landing-promo {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #ffc107;
  border-radius: 1rem;
}

.landing-title {
  margin-bottom: 1rem;
  font-size: calc(1.45rem + 1.6vw);
  font-weight: 700;
  line-height: 1.3;
}

.landing-lead {
  margin-bottom: 1rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
}

.landing-tagline {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffc107;
}

.landing-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: rgba(255, 255, 255, 0.9);
}

.landing-checks .bi {
  margin-inline-end: 0.35rem;
  color: #75b798;
}

.landing .landing-login {
  width: 100%;
  max-width: 400px;
  margin-top: 0;
}

.landing .landing-login .card {
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
}

.landing-section {
  padding-block: 3.5rem;
  scroll-margin-top: 1rem;
}

.landing-section-title {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
}

.landing-section-lead {
  max-width: 46rem;
  margin: 0 auto 2rem;
  color: var(--bs-secondary-color);
  text-align: center;
}

.landing-card {
  display: block;
  padding: 1.5rem;
  color: var(--bs-body-color);
  text-decoration: none;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.04);
}

.landing-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.1);
  border-radius: 0.85rem;
}

.landing-step {
  position: relative;
  height: 100%;
  padding: 1.5rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
}

.landing-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #0d6efd;
  border-radius: 50%;
}

.landing-price-value {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--bs-success-text-emphasis);
}

.landing-bot {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.landing-bot:hover,
.landing-bot:focus-visible {
  border-color: #0d6efd;
}

.landing-faq {
  max-width: 52rem;
  margin: 1.5rem auto 0;
}

.landing-faq-item {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
}

.landing-faq-item summary {
  font-weight: 600;
  cursor: pointer;
}

.landing-faq-item[open] summary {
  margin-bottom: 0.5rem;
}

.landing-contact {
  color: #fff;
}

.landing-contact-whatsapp,
.landing-contact-whatsapp:hover {
  color: #fff;
  background: #1f9d55;
}

.landing-contact-telegram,
.landing-contact-telegram:hover {
  color: #fff;
  background: #1c86c6;
}

.landing-contact-facebook,
.landing-contact-facebook:hover {
  color: #fff;
  background: #1877f2;
}

.landing-contact-whatsapp:hover,
.landing-contact-telegram:hover,
.landing-contact-facebook:hover {
  filter: brightness(1.1);
}

.landing-footer {
  padding-block: 1.5rem;
  background: var(--bs-tertiary-bg);
  border-top: 1px solid var(--bs-border-color);
}

@media (max-width: 575.98px) {
  .landing-hero {
    padding-block: 1.5rem 2rem;
  }

  .landing-section {
    padding-block: 2.5rem;
  }
}

/*
 * «الدليل» (templates/docs/index.html.twig, DESIGN.md §9.31): the public guide. Anchors land below
 * the sticky header, and the contents stay beside the text on wide screens.
 */
.docs-page .docs-chapter,
.docs-page .docs-section {
  scroll-margin-top: 4.5rem;
}

.docs-page .docs-price {
  padding: 1rem 1.25rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
}

.docs-page .docs-toc summary {
  cursor: pointer;
}

.docs-page .docs-points li + li {
  margin-top: 0.35rem;
}

@media (min-width: 992px) {
  .docs-page .docs-toc {
    position: sticky;
    top: 4.5rem;
    max-height: calc(100vh - 5.5rem);
    overflow-y: auto;
  }
}

