/* Network-free compatibility styles for Merchant browser pages. */

:root {
  --merchant-font-stack: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body { font-family: var(--merchant-font-stack); }

/* Keep Bootstrap-Icon markup visible without fetching a webfont. The glyph is
   deliberately generic; accessible names must come from surrounding text or
   aria-label attributes, never from the decorative icon. */
.bi,
[class^="bi-"],
[class*=" bi-"] {
  display: inline-block;
  width: 1em;
  font-style: normal;
  line-height: 1;
  text-align: center;
}
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before { content: "\2022"; }
.bi-check::before,
.bi-check2::before,
.bi-check-circle::before,
.bi-check-circle-fill::before { content: "\2713"; }
.bi-x-lg::before,
.bi-x-circle::before,
.bi-x-circle-fill::before { content: "\00d7"; }
.bi-plus::before,
.bi-plus-circle::before { content: "+"; }
.bi-dash::before { content: "\2212"; }
.bi-chevron-left::before,
.bi-arrow-left::before { content: "\2039"; }
.bi-chevron-right::before,
.bi-arrow-right::before { content: "\203a"; }
.bi-chevron-down::before,
.bi-arrow-down::before { content: "\2304"; }
.bi-chevron-up::before,
.bi-arrow-up::before { content: "\2303"; }
.bi-exclamation-triangle::before,
.bi-exclamation-triangle-fill::before { content: "!"; }
.bi-info-circle::before,
.bi-info-circle-fill::before { content: "i"; }
.bi-question-circle::before { content: "?"; }
.bi-download::before { content: "\2193"; }
.bi-upload::before { content: "\2191"; }
.bi-arrow-repeat::before { content: "\21bb"; }
.bi-pencil::before,
.bi-pencil-square::before { content: "\270e"; }
.bi-trash::before { content: "\232b"; }

/* Select2 4.0.13 is bundled by Django without a Bootstrap theme. */
.select2-container { width: 100% !important; }
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
  min-height: 38px;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
}

/* Minimal same-origin alert presentation used by compat.js. */
.merchant-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .55);
}
.merchant-dialog {
  width: min(34rem, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem;
  border-radius: .75rem;
  background: #fff;
  color: #212529;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .3);
}
.merchant-dialog h2 { margin: 0 0 .75rem; font-size: 1.35rem; }
.merchant-dialog-content { margin-bottom: 1rem; }
.merchant-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.merchant-dialog-toast {
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: none;
}
.merchant-dialog-toast .merchant-dialog { width: min(24rem, 100%); pointer-events: auto; }

/* Native date/time controls replace the external date-range-picker runtime. */
.custom-date-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .5rem;
  padding: .75rem;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  background: #fff;
}
.custom-date-panel.d-none { display: none; }
.custom-date-panel-actions { grid-column: 1 / -1; display: flex; gap: .5rem; justify-content: flex-end; }
@media (max-width: 576px) { .custom-date-panel { grid-template-columns: 1fr; } }
