/* Customer ordering page (phones first) */
:root { --head-h: 72px; }
body.order-page { background: var(--bg); min-height: 100vh; padding-bottom: 90px; }
.o-head { display: flex; align-items: center; gap: 10px; background: var(--brand); color: #F3E3D2; padding: 10px 16px; position: sticky; top: 0; z-index: 10; min-height: 72px; box-sizing: border-box; }
.o-head img { width: 40px; height: 40px; border-radius: 11px; } .o-head b { display: block; font-size: 17px; color: #fff; } .o-head small { font-size: 12px; opacity: .75; }
.o-main { max-width: 640px; margin: 0 auto; padding: 14px; }
.o-hero h1 { font-size: 22px; margin: 4px 0; } .o-hero p { margin: 0 0 8px; color: var(--ink-2); } .o-note { background: var(--amber-soft); padding: 8px 10px; border-radius: 10px; }
.o-last { display: block; background: var(--green-soft); color: var(--green); font-weight: 700; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; }
.o-cats { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); margin: 0 0 16px; } .o-cats .chip { background: var(--surface-2); border-color: var(--line); } .o-cats .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.o-list { display: flex; flex-direction: column; gap: 10px; }
.o-item { display: flex; align-items: center; gap: 12px; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; cursor: pointer; box-shadow: var(--shadow); width: 100%; }
.o-item:active { transform: scale(.98); } .o-item.oos { opacity: .5; }
.o-img { width: 84px; height: 63px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; font-size: 34px; overflow: hidden; flex-shrink: 0; }
.o-img img { width: 100%; height: 100%; object-fit: cover; }
.o-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .o-info small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-price { font-weight: 800; color: var(--accent-d); }
.o-add { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.o-add i { font-style: normal; font-size: 15px; } .o-oos { color: var(--red); font-weight: 700; font-size: 13px; }
.o-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); z-index: 6; }
.o-bar button { width: 100%; max-width: 612px; margin: 0 auto; display: flex; align-items: center; gap: 12px; border: 0; background: var(--accent); color: var(--brand); border-radius: 16px; padding: 15px 18px; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(232,131,58,.45); }
.o-bar span:nth-child(2) { flex: 1; text-align: start; } .o-count { background: rgba(43,26,16,.12); border-radius: 99px; padding: 2px 10px; }
.o-bar .cur { color: var(--brand); opacity: .8; }
.o-big { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.o-lines .line { padding: 8px 2px; }
.o-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.o-pick button { border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; text-align: start; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.o-pick button small { color: var(--muted); font-size: 12px; } .o-pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.o-pick button:disabled { opacity: .4; }
.o-msg { text-align: center; padding: 60px 20px; font-size: 20px; } .o-msg small { font-size: 14px; color: var(--muted); }
/* tracking */
.o-no { text-align: center; background: var(--brand); color: #fff; border-radius: 20px; padding: 18px; margin-bottom: 14px; display: flex; flex-direction: column; }
.o-no b { font-size: 52px; line-height: 1.1; } .o-no small, .o-no span { color: #E8D3BF; }
.o-no.ready { background: var(--green); } .o-no.ready small, .o-no.ready span { color: #E0F4EA; } .o-no.rejected { background: var(--red); }
.o-steps { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 0; }
.o-steps li { position: relative; padding: 0 30px 16px 0; color: var(--muted); display: flex; flex-direction: column; }
.o-steps li::before { content: ''; position: absolute; right: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.o-steps li:not(:last-child)::after { content: ''; position: absolute; right: 12px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.o-steps li.done { color: var(--ink); } .o-steps li.done::before { background: var(--green); }
.o-steps li.now { color: var(--ink); } .o-steps li.now b { color: var(--accent-d); font-size: 17px; } .o-steps li.now::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); animation: pulse 1s infinite alternate; }
.o-when { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.o-tline { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); } .o-tline.total { border: 0; font-size: 16px; padding-top: 10px; }
@media (max-width: 480px) { .o-pick { grid-template-columns: 1fr; } .modal-back { padding: 0; align-items: end; } .modal { border-radius: 20px 20px 0 0; max-height: 92vh; } }
.order-page .modal-back { backdrop-filter: none; background: rgba(30,18,10,.55); }

/* English (left-to-right) */
[dir=ltr] .o-steps li { padding: 0 0 16px 30px; }
[dir=ltr] .o-steps li::before { right: auto; left: 6px; }
[dir=ltr] .o-steps li:not(:last-child)::after { right: auto; left: 12px; }
.o-lang { margin-inline-start: auto; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 10px; padding: 7px 11px; font-weight: 800; font-size: 13px; cursor: pointer; font-family: inherit; }

/* header: the DopaBeans word logo */
.o-brand { display: flex; flex-direction: column; gap: 2px; }
.o-brand .o-word { width: 138px; height: auto; display: block; }
.o-brand small { font-size: 11.5px; opacity: .7; }

/* splash: logo in the middle of the screen right after scanning, then the menu */
#splash { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 42%, #55281A 0%, var(--brand) 55%, #1C110A 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .55s ease, visibility .55s; }
#splash img { width: min(260px, 68vw); height: auto; animation: splashIn .9s cubic-bezier(.2,.8,.2,1) both; }
#splash .spl-load { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: splashFade .6s .45s both; }
#splash .spl-line { width: min(180px, 46vw); height: 5px; border-radius: 99px; background: rgba(246,231,211,.16); overflow: hidden; position: relative; }
#splash .spl-line::after { content: ''; position: absolute; top: 0; bottom: 0; width: 38%; background: linear-gradient(90deg, transparent, var(--accent) 30%, #F7D9B8 70%, transparent); border-radius: 99px; animation: splashBar 1.15s .5s ease-in-out infinite; }
#splash .spl-text { color: rgba(246,231,211,.78); font-size: 13.5px; font-weight: 600; letter-spacing: .2px; }
#splash.out { opacity: 0; visibility: hidden; }
#splash.out img { transform: scale(1.06); transition: transform .55s ease; }
@keyframes splashIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes splashFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes splashBar { 0% { inset-inline-start: -40%; } 100% { inset-inline-start: 100%; } }
@media (prefers-reduced-motion: reduce) { #splash img, #splash .spl-line, #splash .spl-line::after { animation: none; } }

/* menu as a grid of photo cards: products side by side, the photo large on top (4:3, like the cashier screen) */
.o-main { max-width: 1120px; }
.o-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .o-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .o-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.o-list > .o-msg { grid-column: 1 / -1; }
.o-item { position: relative; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 18px; }
.o-item:hover { box-shadow: 0 2px 4px rgba(43,26,16,.06), 0 12px 28px rgba(43,26,16,.1); transform: translateY(-2px); }
.o-img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; font-size: 64px; }
.o-img > span .ic { width: 68px; height: 68px; stroke-width: 1.2; }
.o-img img { transition: transform .35s cubic-bezier(.16,1,.3,1); } .o-item:hover .o-img img { transform: scale(1.04); }
.o-info { padding: 10px 12px 12px; gap: 3px; }
.o-info b { font-size: 15px; line-height: 1.3; }
.o-info > small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; min-height: 2.9em; }
.o-price { margin-top: auto; padding-top: 4px; font-size: 15px; white-space: nowrap; }
.o-item .o-info { flex: 1; }
/* the add button sits on the photo's bottom corner; shows the quantity once in the cart */
.o-img { position: relative; }
.o-img .o-add { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 42px; height: 42px; border: 3px solid var(--surface); box-shadow: 0 6px 16px rgba(201,103,31,.4); }
.o-img .o-oos { position: absolute; top: 10px; inset-inline-end: 10px; background: var(--red); color: #fff; border-radius: 99px; padding: 3px 10px; font-size: 12px; }
@media (max-width: 380px) { .o-info > small { display: none; } }

/* search above the categories */
.o-tools { display: flex; gap: 8px; margin: 4px 0 12px; }
.o-search { flex: 1; display: flex; flex-direction: row; align-items: center; min-width: 0; gap: 8px; margin: 0; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); color: var(--muted); }
.o-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.o-search input { border: 0; box-shadow: none !important; background: transparent; padding: 12px 0; min-height: 46px; font-size: 15px; }
.o-search input::-webkit-search-cancel-button { cursor: pointer; }

/* quick add: − n + on the photo for simple products */
.o-img .o-step { position: absolute; bottom: 10px; inset-inline-end: 10px; display: flex; align-items: center; background: var(--accent); color: var(--brand); border-radius: 99px; border: 3px solid var(--surface); box-shadow: 0 6px 16px rgba(201,103,31,.4); overflow: hidden; }
.o-step > span { width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; font-weight: 800; cursor: pointer; }
.o-step > span:active { background: rgba(0,0,0,.1); }
.o-step i { font-style: normal; font-weight: 800; min-width: 18px; text-align: center; font-size: 15px; }

/* header buttons: my orders (with a count) and share */
.o-head { justify-content: space-between; }
.o-hacts { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.o-hacts .o-lang { margin: 0; }
.o-hbtn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.o-hbtn:active { transform: scale(.94); }
.o-hbtn i { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; border-radius: 99px; background: var(--accent); color: var(--brand); font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

/* my orders */
.o-mine { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.o-mine-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.o-mine-row:active { background: var(--surface-2); }
.o-st { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.o-st.pending { background: var(--blue-soft); color: var(--blue); } .o-st.accepted { background: var(--amber-soft); color: #9A6404; }
.o-st.ready { background: var(--green-soft); color: var(--green); } .o-st.completed { background: var(--surface-2); color: var(--muted); } .o-st.rejected { background: var(--red-soft); color: var(--red); }

/* share */
.o-qr { display: grid; place-items: center; margin: 6px 0 12px; }
.o-qr img { width: 210px; height: 210px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.o-link { text-align: center; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; word-break: break-all; }

/* happy hour on the customer page */
.o-offer { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 8px rgba(232,131,58,.4); }
.o-img { position: relative; }
.o-hh { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--cream, #F9E7D7); padding: 10px 14px; border-radius: 14px; margin: 8px 0 4px; font-size: 14px; box-shadow: var(--shadow); }
.o-hh b { color: #fff; }

/* Security & anti-inspect */
body.order-page {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.order-page input, body.order-page textarea {
  -webkit-user-select: auto;
  user-select: auto;
}
body.order-page img {
  -webkit-user-drag: none;
  user-drag: none;
}

