/* iPOS365 website: page basics and the phone / tablet layout. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0}
.dc-host{min-width:0}
img{max-width:100%}

/* Phones: page sections stack in one column (never inside the real screens). */
@media (max-width: 900px) {
  #app [style*="display: grid"]:not(.dc-host *):not([style*="auto-fit"]):not([style*="auto-fill"]),
  #app [style*="display:grid"]:not(.dc-host *):not([style*="auto-fit"]):not([style*="auto-fill"]) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Home page on phones and tablets */
@media (max-width: 860px) {
  #top, #demo { height: auto !important; min-height: 0 !important; }
}
@media (max-width: 600px) {
  .hdr nav { gap: 8px !important; padding: 8px 8px 8px 14px !important; flex-wrap: nowrap !important; }
  .hdr nav > a:first-child { width: 104px !important; flex: none; }
  .hdr button[aria-label="Language"] { font-size: 0 !important; gap: 2px !important; padding: 0 10px !important; }
  .hdr .btn.bk { padding-inline: 14px !important; font-size: 13px !important; white-space: nowrap; }
}

/* The header bar never wraps onto two lines. */
.hdr nav { flex-wrap: nowrap !important; }
.hdr nav a, .hdr nav button { white-space: nowrap; }

/* Phones: home page sections built from fixed-size phones and screens */
@media (max-width: 600px) {
  #app [style*="flex: 1 1"]:not(.dc-host *) { flex-basis: 100% !important; min-width: 0 !important; }
  #staffpos { max-width: none !important; }
}

/* Phones: rows of screens that scrolled sideways now wrap and shrink to fit. */
@media (max-width: 600px) {
  .hs:not(.dc-host *) > [style*="display: flex"] { flex-wrap: wrap !important; justify-content: center !important; width: auto !important; max-width: 100%; }
  .hs:not(.dc-host *):has(> table) { overflow-x: auto; }
}

/* Tablets and phones: the customer screen sits under the counter POS instead of disappearing. */
@media (max-width: 1100px) {
  #app .cdm { display: flex !important; position: static !important; transform: none !important; margin: 18px auto 0; }
}

/* Phones and tablets: the live-demo POS tablet keeps its desktop look (shrunk to fit); the QR phone stays under it. */
@media (max-width: 860px) {
  #demo .tab { flex: none !important; width: 940px !important; max-width: none !important; }
  #demo .tscr { height: 600px !important; }
  #demo .rail { width: 72px !important; }
  #demo .ri { width: 60px !important; font-size: 10px !important; }
  #demo .cartP { display: flex !important; }
  #demo .tab .hideS { display: flex !important; }
}
@media (max-width: 860px) { #demo .iph { zoom: 0.7; } }

/* Phones and tablets: the demo QR phone tilts 5° and moves right; a floating QR code (opens this site's live demo) sits beside it. */
@keyframes qrfloat { 0%, 100% { transform: translateY(0) rotate(5deg); } 50% { transform: translateY(-10px) rotate(5deg); } }
@media (max-width: 860px) {
  #demo .stage { position: relative; }
  #demo .iph { order: -1; margin: 8px 0 28px !important; transform: translateX(22%) rotate(5deg) !important; }
  #demo .stage::after {
    content: ""; position: absolute; left: max(12px, calc(50% - 190px)); top: 64px; z-index: 3;
    width: 112px; height: 112px; box-sizing: border-box; padding: 10px; border-radius: 18px;
    background: #fff url(/media/qr-demo-com.svg) center / 92px no-repeat;
    box-shadow: 0 18px 40px -12px rgba(24, 24, 27, .35), 0 0 0 1px rgba(24, 24, 27, .06);
    animation: qrfloat 3.2s ease-in-out infinite;
  }
  html[data-market="tw"] #demo .stage::after { background-image: url(/media/qr-demo-tw.svg); }
  html[data-market="ma"] #demo .stage::after { background-image: url(/media/qr-demo-ma.svg); }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { #demo .stage::after { animation: none; transform: rotate(5deg); } }

/* Phones and tablets: main features listed beside the demo phone, under the QR code. */
@media (max-width: 860px) {
  #demo .dfeat { display: flex !important; flex-direction: column; align-items: flex-start; gap: 5px; position: absolute; left: max(12px, calc(50% - 190px)); top: 196px; z-index: 3; width: 132px; margin: 0; padding: 0; list-style: none; }
  #demo .dfeat li { display: flex; align-items: center; gap: 6px; padding: 4px 9px; white-space: nowrap; border-radius: 999px; background: #fff; box-shadow: 0 4px 14px -6px rgba(24,24,27,.3), 0 0 0 1px rgba(24,24,27,.06); font-size: 11.5px !important; font-weight: 700; color: #18181B; line-height: 1.2; }
  #demo .dfeat li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #EA7E41; flex: none; }
}

/* 861–1259 px: the header links get their own row under the logo, language and trial button. */
@media (min-width: 861px) and (max-width: 1259px) {
  .hdr nav { flex-wrap: wrap !important; border-radius: 28px !important; row-gap: 6px !important; }
  .hdr nav > a:first-child { margin-inline-end: auto; }
}

/* Links to pages left out of a release build. */
[data-off] { display: none !important; }
