/* ==========================================================
   SMARTPOS FINAL SIDEBAR + COMPACT SALES PRODUCTS
   This file must remain the last stylesheet in index.html.
   ========================================================== */

:root {
  --smartpos-sidebar-width: 280px;
  --smartpos-page-padding: 28px;
  --smartpos-content-gap: 22px;
}

/* ==========================================================
   DOCUMENT
   ========================================================== */

html,
body {
  width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  overflow-x: hidden !important;
}

body {
  min-height: 100vh !important;
  background: var(--bg, #f4f7fb) !important;
}

*,
*::before,
*::after {
  box-sizing: border-box !important;
}

/* ==========================================================
   APPLICATION SHELL
   ========================================================== */

#posApp.app {
  display: block !important;
  position: relative !important;

  width: 100% !important;
  min-height: 100vh !important;

  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================
   FULL-HEIGHT FIXED SIDEBAR
   ========================================================== */

#posApp > aside.sidebar {
  position: fixed !important;

  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  left: 0 !important;

  width: var(--smartpos-sidebar-width) !important;
  min-width: var(--smartpos-sidebar-width) !important;
  max-width: var(--smartpos-sidebar-width) !important;

  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;

  display: flex !important;
  flex-direction: column !important;

  margin: 0 !important;
  padding: 24px !important;

  overflow: hidden !important;

  border: 0 !important;
  border-radius: 0 !important;

  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.14), transparent 30%),
    linear-gradient(180deg, #101828 0%, #0b1220 100%) !important;

  color: #ffffff !important;

  z-index: 10000 !important;

  box-shadow: 12px 0 35px rgba(15, 23, 42, 0.08) !important;
}

/* Branding remains visible at the top. */

#posApp > .sidebar > .brand {
  flex: 0 0 auto !important;
  margin-bottom: 24px !important;
}

/* Only the menu scrolls. */

#posApp > .sidebar > nav.nav {
  flex: 1 1 auto !important;

  width: 100% !important;
  min-height: 0 !important;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  padding-right: 7px !important;

  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

/* Chrome and Electron scrollbar. */

#posApp > .sidebar > nav.nav::-webkit-scrollbar {
  width: 6px;
}

#posApp > .sidebar > nav.nav::-webkit-scrollbar-track {
  background: transparent;
}

#posApp > .sidebar > nav.nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
}

/* Sidebar account section stays at the bottom without overlap. */

#posApp > .sidebar > .sidebar-footer {
  position: static !important;

  inset: auto !important;

  flex: 0 0 auto !important;

  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;

  margin: 14px 0 0 !important;
  padding: 15px 17px !important;

  border-radius: 17px !important;

  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;

  box-shadow: none !important;
}

/* ==========================================================
   SIDEBAR LINK DESIGN AND ANIMATION
   ========================================================== */

#posApp .sidebar .nav-link {
  position: relative !important;

  min-height: 46px !important;

  margin: 0 0 6px !important;
  padding: 11px 14px !important;

  overflow: hidden !important;

  border-radius: 14px !important;

  color: #cbd5e1 !important;
  background: transparent !important;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease !important;

  animation: smartposNavItemIn 0.35s ease both;
}

#posApp .sidebar .nav-link::before {
  content: "";

  position: absolute;

  top: 50%;
  left: 0;

  width: 4px;
  height: 0;

  border-radius: 0 999px 999px 0;

  background: #60a5fa;

  transform: translateY(-50%);

  transition: height 0.2s ease !important;
}

#posApp .sidebar .nav-link:hover {
  color: #ffffff !important;

  background: rgba(255, 255, 255, 0.07) !important;

  transform: translateX(3px) !important;
}

#posApp .sidebar .nav-link.active {
  color: #ffffff !important;

  background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.95)) !important;

  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.18) !important;
}

#posApp .sidebar .nav-link.active::before {
  height: 24px !important;
}

#posApp .sidebar .nav-link:nth-child(1) {
  animation-delay: 0.02s;
}
#posApp .sidebar .nav-link:nth-child(2) {
  animation-delay: 0.04s;
}
#posApp .sidebar .nav-link:nth-child(3) {
  animation-delay: 0.06s;
}
#posApp .sidebar .nav-link:nth-child(4) {
  animation-delay: 0.08s;
}
#posApp .sidebar .nav-link:nth-child(5) {
  animation-delay: 0.1s;
}
#posApp .sidebar .nav-link:nth-child(6) {
  animation-delay: 0.12s;
}
#posApp .sidebar .nav-link:nth-child(7) {
  animation-delay: 0.14s;
}
#posApp .sidebar .nav-link:nth-child(8) {
  animation-delay: 0.16s;
}
#posApp .sidebar .nav-link:nth-child(9) {
  animation-delay: 0.18s;
}
#posApp .sidebar .nav-link:nth-child(10) {
  animation-delay: 0.2s;
}
#posApp .sidebar .nav-link:nth-child(11) {
  animation-delay: 0.22s;
}
#posApp .sidebar .nav-link:nth-child(12) {
  animation-delay: 0.24s;
}
#posApp .sidebar .nav-link:nth-child(13) {
  animation-delay: 0.26s;
}

/* ==========================================================
   MAIN CONTENT
   ========================================================== */

#posApp > main.main {
  position: relative !important;

  width: calc(100% - var(--smartpos-sidebar-width)) !important;

  min-width: 0 !important;
  max-width: none !important;
  min-height: 100vh !important;

  margin: 0 0 0 var(--smartpos-sidebar-width) !important;

  padding: var(--smartpos-page-padding) !important;

  overflow-x: hidden !important;
  overflow-y: visible !important;
}

/* Remove all duplicate sidebar offsets. */

#posApp > main.main > .topbar,
#posApp > main.main > .dashboard-section,
#posApp > main.main > .page-section {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  margin-left: 0 !important;
  margin-right: 0 !important;
}

.topbar,
.page-header {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ==========================================================
   SALES / POS TWO-COLUMN LAYOUT
   ========================================================== */

#salesSection .pos-layout {
  display: grid !important;

  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(310px, 0.75fr) !important;

  gap: var(--smartpos-content-gap) !important;

  width: 100% !important;
  min-width: 0 !important;

  align-items: start !important;
}

#salesSection .pos-products-panel,
#salesSection .pos-cart-panel {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  padding: 20px !important;

  border-radius: 22px !important;

  box-sizing: border-box !important;
}

/* Keep the sale summary visible while products scroll. */

@media (min-width: 961px) {
  #salesSection .pos-cart-panel {
    position: sticky !important;
    top: 22px !important;
  }
}

/* ==========================================================
   COMPACT PRODUCT SEARCH AREA
   ========================================================== */

#salesSection .search-box {
  min-height: 50px !important;

  margin-bottom: 14px !important;
  padding: 11px 14px !important;

  border-radius: 14px !important;
}

#salesSection .search-box input {
  font-size: 14px !important;
}

/*
  The product list scrolls inside the product panel instead of
  making the full application page extremely long.
*/

#salesSection #productResults {
  display: grid !important;

  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;

  gap: 12px !important;

  width: 100% !important;
  min-width: 0 !important;

  max-height: calc(100vh - 315px) !important;

  padding: 2px 6px 4px 2px !important;

  overflow-x: hidden !important;
  overflow-y: auto !important;

  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

#salesSection #productResults::-webkit-scrollbar {
  width: 7px;
}

#salesSection #productResults::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f1f5f9;
}

#salesSection #productResults::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #94a3b8;
}

/* ==========================================================
   HIGH-QUALITY COMPACT PRODUCT CARDS
   ========================================================== */

#salesSection .pos-product-card {
  position: relative !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;

  width: 100% !important;
  min-width: 0 !important;
  min-height: 138px !important;

  margin: 0 !important;
  padding: 14px 15px !important;

  overflow: hidden !important;

  border: 1px solid #e2e8f0 !important;

  border-radius: 16px !important;

  background: linear-gradient(150deg, #ffffff 0%, #fbfdff 100%) !important;

  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035) !important;

  cursor: pointer !important;

  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease !important;

  animation: smartposProductCardIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both !important;

  will-change: transform, opacity;
}

#salesSection .pos-product-card::after {
  content: "";

  position: absolute;

  right: -35px;
  bottom: -45px;

  width: 100px;
  height: 100px;

  border-radius: 50%;

  background: radial-gradient(circle, rgba(37, 99, 235, 0.07), transparent 68%);

  pointer-events: none;
}

#salesSection .pos-product-card:hover {
  border-color: rgba(37, 99, 235, 0.72) !important;

  background: linear-gradient(150deg, #ffffff 0%, #f5f9ff 100%) !important;

  box-shadow: 0 13px 28px rgba(37, 99, 235, 0.12) !important;

  transform: translateY(-4px) scale(1.008) !important;
}

#salesSection .pos-product-card:active {
  transform: translateY(-1px) scale(0.992) !important;
}

#salesSection .pos-product-card h4 {
  margin: 0 0 6px !important;

  color: #0f172a !important;

  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1.3 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#salesSection .pos-product-card p {
  margin: 0 0 7px !important;

  color: #64748b !important;

  font-size: 11.5px !important;
  line-height: 1.35 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#salesSection .pos-product-card strong {
  display: block !important;

  margin: 0 0 8px !important;

  color: #0f172a !important;

  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

#salesSection .stock-pill {
  width: max-content !important;

  padding: 5px 9px !important;

  border-radius: 999px !important;

  font-size: 10.5px !important;
  font-weight: 900 !important;

  line-height: 1.2 !important;
}

/* Product entrance delays. */

#salesSection .pos-product-card:nth-child(1) {
  animation-delay: 0.02s !important;
}
#salesSection .pos-product-card:nth-child(2) {
  animation-delay: 0.04s !important;
}
#salesSection .pos-product-card:nth-child(3) {
  animation-delay: 0.06s !important;
}
#salesSection .pos-product-card:nth-child(4) {
  animation-delay: 0.08s !important;
}
#salesSection .pos-product-card:nth-child(5) {
  animation-delay: 0.1s !important;
}
#salesSection .pos-product-card:nth-child(6) {
  animation-delay: 0.12s !important;
}
#salesSection .pos-product-card:nth-child(7) {
  animation-delay: 0.14s !important;
}
#salesSection .pos-product-card:nth-child(8) {
  animation-delay: 0.16s !important;
}
#salesSection .pos-product-card:nth-child(9) {
  animation-delay: 0.18s !important;
}

/* ==========================================================
   CART COMPACTING
   ========================================================== */

#salesSection .cart-items {
  min-height: 170px !important;
}

#salesSection .cart-row {
  padding: 11px 0 !important;
}

#salesSection .cart-summary {
  gap: 11px !important;
  padding-top: 14px !important;
}

#salesSection .payment-box {
  margin-top: 14px !important;
}

#salesSection .pos-actions {
  gap: 10px !important;
  margin-top: 14px !important;
}

/* ==========================================================
   ANIMATIONS
   ========================================================== */

@keyframes smartposNavItemIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes smartposProductCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================
   MEDIUM ELECTRON WINDOWS
   ========================================================== */

@media (max-width: 1180px) {
  :root {
    --smartpos-sidebar-width: 255px;
    --smartpos-page-padding: 22px;
  }

  #salesSection #productResults {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)) !important;
  }
}

/*
  Keep the POS in two columns until the available window becomes
  genuinely too narrow.
*/

@media (max-width: 960px) {
  #salesSection .pos-layout {
    grid-template-columns: 1fr !important;
  }

  #salesSection .pos-cart-panel {
    position: static !important;
  }

  #salesSection #productResults {
    max-height: 520px !important;

    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 850px) {
  :root {
    --smartpos-page-padding: 18px;
  }

  #posApp.app {
    display: flex !important;
    flex-direction: column !important;
  }

  #posApp > aside.sidebar {
    position: relative !important;

    inset: auto !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
  }

  #posApp > .sidebar > nav.nav {
    overflow-y: visible !important;
  }

  #posApp > main.main {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;

    padding: var(--smartpos-page-padding) !important;
  }
}

@media (max-width: 600px) {
  #salesSection #productResults {
    max-height: none !important;

    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

    overflow-y: visible !important;
  }

  #salesSection .pos-product-card {
    min-height: 132px !important;
    padding: 13px !important;
  }
}

@media (max-width: 420px) {
  #salesSection #productResults {
    grid-template-columns: 1fr !important;
  }
}

/* Accessibility: reduce animation when requested. */

@media (prefers-reduced-motion: reduce) {
  #posApp .sidebar .nav-link,
  #salesSection .pos-product-card {
    animation: none !important;
    transition: none !important;
  }
}

/* === SMARTPOS PRODUCT BLINK FIX START === */

/*
  Cloud synchronisation may rebuild #productResults.
  Do not replay entrance animations every time data is updated.
*/

#salesSection #productResults {
  position: relative !important;

  min-height: 420px !important;

  opacity: 1 !important;
  visibility: visible !important;

  background: transparent !important;

  contain: layout paint;

  transform: translateZ(0);
  backface-visibility: hidden;

  transition: none !important;
}

/* Stop repeated entrance animation during cloud updates. */

#salesSection #productResults .pos-product-card {
  animation: none !important;
  animation-name: none !important;
  animation-delay: 0s !important;
  animation-duration: 0s !important;

  opacity: 1 !important;
  visibility: visible !important;

  will-change: auto !important;
  backface-visibility: hidden;

  transform: translateZ(0) !important;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease !important;
}

/* Keep the high-quality hover movement. */

#salesSection #productResults .pos-product-card:hover {
  transform: translateY(-3px) translateZ(0) !important;
}

#salesSection #productResults .pos-product-card:active {
  transform: translateY(-1px) scale(0.99) translateZ(0) !important;
}

/*
  Prevent possible synchronisation classes from fading or
  filtering the product area.
*/

#salesSection #productResults.syncing,
#salesSection #productResults.is-syncing,
#salesSection #productResults.loading,
#salesSection #productResults.is-loading,
#salesSection #productResults[aria-busy="true"],
#salesSection .pos-products-panel.syncing,
#salesSection .pos-products-panel.is-syncing,
#salesSection .pos-products-panel.loading {
  opacity: 1 !important;
  visibility: visible !important;

  filter: none !important;
  animation: none !important;
  transition: none !important;
}

/* Keep the Product Search panel permanently visible. */

#salesSection .pos-products-panel {
  opacity: 1 !important;
  visibility: visible !important;

  animation: none !important;

  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Do not animate children again when cloud data changes. */

#salesSection #productResults *,
#salesSection #productResults *::before,
#salesSection #productResults *::after {
  animation-play-state: paused !important;
}

/* Restore button and card interaction transitions. */

#salesSection #productResults .pos-product-card,
#salesSection #productResults .pos-product-card * {
  animation: none !important;
}

@media (max-width: 960px) {
  #salesSection #productResults {
    min-height: 360px !important;
  }
}

@media (max-width: 600px) {
  #salesSection #productResults {
    min-height: 280px !important;
  }
}

/* === SMARTPOS PRODUCT BLINK FIX END === */

/* === SMARTPOS RECEIPT VISIBILITY FIX START === */

/* ----------------------------------------------------------
   RECEIPT PAGE CONTAINER
   ---------------------------------------------------------- */

#receiptsSection {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  overflow: visible !important;
}

#receiptsSection .page-header {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ----------------------------------------------------------
   RECEIPT TWO-COLUMN LAYOUT
   Give the preview enough guaranteed space.
   ---------------------------------------------------------- */

#receiptsSection .receipt-layout {
  display: grid !important;

  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(430px, 0.85fr) !important;

  gap: 24px !important;

  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  align-items: start !important;

  overflow: visible !important;
}

/* Both receipt panels must be allowed to shrink inside the grid. */

#receiptsSection .receipt-settings-panel,
#receiptsSection .receipt-preview-panel {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  padding: 24px !important;

  overflow: visible !important;

  box-sizing: border-box !important;
}

/* Keep preview available while editing settings. */

@media (min-width: 1251px) {
  #receiptsSection .receipt-preview-panel {
    position: sticky !important;
    top: 22px !important;
  }
}

/* ----------------------------------------------------------
   RECEIPT SETTINGS FORM
   ---------------------------------------------------------- */

#receiptsSection .form-grid {
  display: grid !important;

  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

  gap: 18px !important;

  width: 100% !important;
  min-width: 0 !important;
}

#receiptsSection .form-group {
  min-width: 0 !important;
  max-width: 100% !important;
}

#receiptsSection .form-group.full {
  grid-column: 1 / -1 !important;
}

#receiptsSection input,
#receiptsSection select,
#receiptsSection textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  box-sizing: border-box !important;
}

/* Prevent the native file field from stretching the grid. */

#receiptsSection input[type="file"] {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ----------------------------------------------------------
   PREVIEW WRAPPER
   ---------------------------------------------------------- */

#receiptsSection .thermal-preview-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;

  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  padding: 18px !important;

  overflow-x: hidden !important;
  overflow-y: visible !important;

  border-radius: 18px !important;

  background: #f8fafc !important;

  box-sizing: border-box !important;
}

/* ----------------------------------------------------------
   THERMAL RECEIPT
   Fit completely inside the preview panel.
   ---------------------------------------------------------- */

#receiptsSection .thermal-receipt-preview {
  width: 100% !important;
  max-width: 360px !important;
  min-width: 0 !important;

  margin: 0 auto !important;
  padding: 18px !important;

  overflow: hidden !important;

  color: #111827 !important;
  background: #ffffff !important;

  box-sizing: border-box !important;
}

/* Allow all receipt information to wrap safely. */

#receiptsSection .thermal-receipt-preview h3,
#receiptsSection .thermal-receipt-preview p,
#receiptsSection .thermal-receipt-preview span,
#receiptsSection .thermal-receipt-preview strong,
#receiptsSection .thermal-receipt-preview td,
#receiptsSection .thermal-receipt-preview th {
  min-width: 0 !important;
  max-width: 100% !important;

  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

/* Business title and contact information. */

#receiptsSection .thermal-receipt-preview h3 {
  font-size: 15px !important;
  line-height: 1.35 !important;
}

#receiptsSection .thermal-receipt-preview p {
  white-space: normal !important;
  line-height: 1.45 !important;
}

/* Receipt information rows. */

#receiptsSection .receipt-line {
  display: grid !important;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, auto) !important;

  align-items: start !important;

  gap: 10px !important;

  width: 100% !important;
  min-width: 0 !important;
}

#receiptsSection .receipt-line span {
  min-width: 0 !important;
}

#receiptsSection .receipt-line strong {
  min-width: 0 !important;
  max-width: 190px !important;

  text-align: right !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

/* ----------------------------------------------------------
   RECEIPT TABLE
   Prevent Item, Qty, Price and Total from being cut.
   ---------------------------------------------------------- */

#receiptsSection .receipt-preview-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;

  table-layout: fixed !important;

  border-collapse: collapse !important;

  font-size: 10px !important;
}

#receiptsSection .receipt-preview-table th,
#receiptsSection .receipt-preview-table td {
  min-width: 0 !important;

  padding: 6px 3px !important;

  white-space: normal !important;
  overflow-wrap: anywhere !important;

  vertical-align: top !important;
}

/* Item column receives the largest space. */

#receiptsSection .receipt-preview-table th:nth-child(1),
#receiptsSection .receipt-preview-table td:nth-child(1) {
  width: 43% !important;
  text-align: left !important;
}

#receiptsSection .receipt-preview-table th:nth-child(2),
#receiptsSection .receipt-preview-table td:nth-child(2) {
  width: 12% !important;
  text-align: center !important;
}

#receiptsSection .receipt-preview-table th:nth-child(3),
#receiptsSection .receipt-preview-table td:nth-child(3) {
  width: 21% !important;
  text-align: right !important;
}

#receiptsSection .receipt-preview-table th:nth-child(4),
#receiptsSection .receipt-preview-table td:nth-child(4) {
  width: 24% !important;
  text-align: right !important;
}

/* ----------------------------------------------------------
   LOGO AND QR
   ---------------------------------------------------------- */

#receiptsSection .receipt-logo-preview {
  width: 82px !important;
  height: 82px !important;
  max-width: 100% !important;

  margin: 0 auto 10px !important;
}

#receiptsSection .receipt-logo-preview img {
  width: 100% !important;
  height: 100% !important;

  object-fit: contain !important;
}

#receiptsSection .preview-qr-box {
  width: 96px !important;
  height: 96px !important;
  max-width: 100% !important;

  margin: 12px auto !important;
}

/* ----------------------------------------------------------
   RESPONSIVE LAYOUT
   ---------------------------------------------------------- */

/*
  Use one column before the preview becomes too narrow.
  The full preview will appear below the settings panel.
*/

@media (max-width: 1250px) {
  #receiptsSection .receipt-layout {
    grid-template-columns: 1fr !important;
  }

  #receiptsSection .receipt-preview-panel {
    position: static !important;
  }

  #receiptsSection .thermal-receipt-preview {
    max-width: 390px !important;
  }
}

@media (max-width: 700px) {
  #receiptsSection .form-grid {
    grid-template-columns: 1fr !important;
  }

  #receiptsSection .form-group.full {
    grid-column: 1 !important;
  }

  #receiptsSection .receipt-settings-panel,
  #receiptsSection .receipt-preview-panel {
    padding: 18px !important;
  }

  #receiptsSection .thermal-preview-wrapper {
    padding: 12px !important;
  }

  #receiptsSection .thermal-receipt-preview {
    width: 100% !important;
    max-width: 340px !important;

    padding: 14px !important;
  }

  #receiptsSection .receipt-actions {
    flex-direction: column !important;
  }

  #receiptsSection .receipt-actions button {
    width: 100% !important;
  }
}

/* === SMARTPOS RECEIPT VISIBILITY FIX END === */
