/* Quick order + payment options. Uses theme tokens with safe fallbacks. */
:root { --egb-qo-ink:var(--wp--preset--color--carbon,#13243a); --egb-qo-muted:var(--wp--preset--color--graphite,#526176); --egb-qo-line:var(--wp--preset--color--line,#dee5ef); --egb-qo-mist:var(--wp--preset--color--mist,#f3f6fb); --egb-qo-blue:var(--wp--preset--color--signal,#185adb); }

/* Entry button: secondary to "Додати в кошик", same height, full width. */
.egb-qo-entry { display:flex; flex-direction:column; gap:6px; }
.egb-qo-open { display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:50px; padding:10px 18px; border:1.5px solid var(--egb-qo-blue); border-radius:6px; background:#fff; color:var(--egb-qo-blue); font:600 16px/1.2 var(--wp--preset--font-family--body,inherit); cursor:pointer; transition:background .15s, color .15s; -webkit-tap-highlight-color:transparent; }
.egb-qo-open[hidden],.egb-qo-entry-note[hidden] { display:none; }
.egb-qo-open svg { width:18px; height:18px; flex:none; }
.egb-qo-open:hover { background:var(--egb-qo-mist); }
.egb-qo-open:active { transform:translateY(1px); }
.egb-qo-open:focus-visible,.egb-qo :is(button,a,input,textarea,summary):focus-visible { outline:2px solid var(--egb-qo-blue); outline-offset:2px; }
.egb-qo-entry-note { margin:0; text-align:center; color:var(--egb-qo-muted); font-size:13px; line-height:1.4; }
.egb-product .egb-purchase-panel > .egb-qo-entry { flex:0 0 100%; }

/* Installment hint under prices. */
.egb-payhint { display:flex; align-items:center; gap:8px; margin:6px 0 0; color:var(--egb-qo-ink); font-size:14px; font-weight:600; line-height:1.35; }
.egb-payhint-logos { display:inline-flex; }
.egb-payhint-logos .egb-paylogo { width:20px; height:20px; border-radius:5px; box-shadow:0 0 0 2px #fff; }
.egb-payhint-logos .egb-paylogo + .egb-paylogo { margin-left:-5px; }
.egb-payhint--card { margin:2px 0 6px; font-size:13px; color:var(--egb-qo-muted); }
.egb-payhint--card .egb-paylogo { width:18px; height:18px; }
.egb-payhint-logos .egb-paylogo--official { box-sizing:border-box; background:#fff; object-fit:contain; }
.egb-payhint-logos .egb-paylogo--official[src*="privat_parts"] { padding:3px; }
.egb-payhint-logos .egb-paylogo--official[src*="pumb_digital"] { padding:2px; }
.egb-payhint-logos .egb-paylogo--official[src*="mono_chast"] { padding:0; background:transparent; }

/* Payment list on the product page. */
.egb-paylist { margin:0; padding:14px 0 0; border-top:1px solid var(--egb-qo-line); }
.egb-paylist-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }
.egb-paylist-head strong { font-size:15px; color:var(--egb-qo-ink); }
.egb-paylist-head a { font-size:13px; color:var(--egb-qo-blue); text-decoration:none; font-weight:600; }
.egb-paylist-head a:hover { text-decoration:underline; }
.egb-paylist ul { display:grid; grid-template-columns:1fr; gap:8px; margin:0; padding:0; list-style:none; }
.egb-payopt { display:flex; align-items:center; gap:12px; min-height:48px; padding:8px 12px; border:1px solid var(--egb-qo-line); border-radius:8px; background:#fff; box-sizing:border-box; }
.egb-payopt .egb-paylogo { width:32px; height:32px; flex:none; border-radius:8px; }
.egb-payopt > span { display:flex; flex-direction:column; min-width:0; }
.egb-payopt b { color:var(--egb-qo-ink); font-size:14px; font-weight:600; line-height:1.3; }
.egb-payopt small { color:var(--egb-qo-muted); font-size:13px; line-height:1.35; }
.egb-payopt--parts { border-color:#cfdcf6; background:linear-gradient(90deg,#f5f8ff,#fff 70%); }
@media (min-width:768px) and (max-width:1099px), (min-width:1280px) {
 .egb-paylist ul:has(> li:nth-child(2)) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Dialog: bottom sheet on phones, centred card on larger screens. */
.egb-qo { width:100%; max-width:100%; max-height:100%; margin:0; padding:0; border:0; background:transparent; color:var(--egb-qo-ink); overflow:visible; }
.egb-qo::backdrop { background:rgba(19,36,58,.55); }
.egb-qo[open] { display:flex; align-items:flex-end; justify-content:center; position:fixed; inset:0; height:100%; box-sizing:border-box; }
.egb-qo-sheet { position:relative; width:100%; max-height:92vh; max-height:92dvh; overflow-y:auto; overscroll-behavior:contain; box-sizing:border-box; padding:8px 20px calc(20px + env(safe-area-inset-bottom)); background:#fff; border-radius:18px 18px 0 0; box-shadow:0 -12px 40px rgba(19,36,58,.18); font-family:var(--wp--preset--font-family--body,inherit); animation:egb-qo-up .22s ease-out; }
.egb-qo-grip { width:40px; height:4px; margin:4px auto 6px; border-radius:2px; background:var(--egb-qo-line); }
@keyframes egb-qo-up { from { transform:translateY(24px); opacity:.6; } to { transform:none; opacity:1; } }
@keyframes egb-qo-in { from { transform:scale(.97); opacity:.4; } to { transform:none; opacity:1; } }
@media (min-width:640px) {
 .egb-qo[open] { align-items:center; padding:24px; }
 .egb-qo-sheet { max-width:480px; border-radius:14px; padding:14px 28px 28px; box-shadow:0 24px 64px rgba(19,36,58,.25); animation-name:egb-qo-in; }
 .egb-qo-grip { display:none; }
}
.egb-qo-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
.egb-qo-head h2,.egb-qo-done h2 { margin:0; font-family:var(--wp--preset--font-family--display,inherit); font-size:20px; font-weight:700; letter-spacing:-.02em; line-height:1.25; }
.egb-qo-close { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; margin-right:-10px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--egb-qo-muted); cursor:pointer; }
.egb-qo-close:hover { background:var(--egb-qo-mist); color:var(--egb-qo-ink); }
.egb-qo-close svg { width:22px; height:22px; }
.egb-qo-form { display:flex; flex-direction:column; gap:14px; margin:0; }
.egb-qo-form[hidden] { display:none; }
.egb-qo-product { display:flex; align-items:center; gap:12px; padding:10px; border-radius:10px; background:var(--egb-qo-mist); }
.egb-qo-product img { flex:none; width:64px; height:64px; object-fit:contain; border-radius:8px; background:#fff; }
.egb-qo-product p { margin:0; }
.egb-qo-name { font-size:15px; font-weight:600; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.egb-qo-meta { margin-top:6px!important; }
.egb-qo-sum { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.egb-qo-qty { display:inline-flex; align-items:center; border:1px solid var(--egb-qo-line); border-radius:8px; overflow:hidden; }
.egb-qo-qty button { width:44px; height:44px; padding:0; border:0; background:#fff; color:var(--egb-qo-ink); font-size:22px; line-height:1; cursor:pointer; }
.egb-qo-qty button:disabled { color:#c5d0de; cursor:default; }
.egb-qo-qty input { width:44px; height:44px; padding:0; border:0; border-inline:1px solid var(--egb-qo-line); border-radius:0; text-align:center; font-weight:600; font-size:16px; color:var(--egb-qo-ink); -moz-appearance:textfield; appearance:textfield; }
.egb-qo-qty input::-webkit-outer-spin-button,.egb-qo-qty input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.egb-qo-total { display:flex; flex-direction:column; align-items:flex-end; margin:0; line-height:1.2; }
.egb-qo-total small { color:var(--egb-qo-muted); font-size:12px; }
.egb-qo-total strong { font-family:var(--wp--preset--font-family--display,inherit); font-size:22px; letter-spacing:-.02em; white-space:nowrap; font-variant-numeric:tabular-nums; }
.egb-qo-field { display:flex; flex-direction:column; gap:6px; margin:0; }
.egb-qo-field > span { font-size:14px; font-weight:600; }
.egb-qo-field em { font-style:normal; font-weight:400; color:var(--egb-qo-muted); }
.egb-qo-field :is(input,textarea) { width:100%; min-height:50px; box-sizing:border-box; padding:12px 14px; border:1px solid #c5d0de; border-radius:8px; background:#fff; color:var(--egb-qo-ink); font-family:inherit; font-size:17px; line-height:1.35; transition:border-color .15s, box-shadow .15s; }
.egb-qo-field textarea { min-height:72px; resize:vertical; font-size:16px; }
.egb-qo-field :is(input,textarea):focus { border-color:var(--egb-qo-blue); box-shadow:0 0 0 3px rgba(24,90,219,.15); outline:0; }
.egb-qo-field [aria-invalid=true] { border-color:#b42318; box-shadow:0 0 0 3px rgba(180,35,24,.12); }
.egb-qo-field :is(input,textarea)::placeholder { color:#8a97a8; }
.egb-qo-more summary { display:inline-flex; align-items:center; min-height:32px; color:var(--egb-qo-blue); font-size:14px; font-weight:600; cursor:pointer; list-style:none; }
.egb-qo-more summary::-webkit-details-marker { display:none; }
.egb-qo-more summary::before { content:"+"; width:16px; margin-right:4px; font-size:18px; line-height:1; }
.egb-qo-more[open] summary::before { content:"−"; }
.egb-qo-more[open] { display:flex; flex-direction:column; gap:12px; }
.egb-qo-check { display:flex; align-items:flex-start; gap:10px; font-size:14px; line-height:1.4; cursor:pointer; }
.egb-qo-check input { width:20px; height:20px; margin:0; flex:none; accent-color:var(--egb-qo-blue); }
.egb-qo-hp { position:absolute!important; left:-9999px!important; width:1px; height:1px; overflow:hidden; }
.egb-qo-error { margin:0; padding:10px 12px; border-radius:8px; background:#fdecea; color:#b42318; font-size:14px; line-height:1.4; }
.egb-qo-error[hidden] { display:none; }
.egb-qo-submit { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:54px; padding:12px 20px; border:0; border-radius:8px; background:var(--egb-qo-blue); color:#fff; font-family:inherit; font-size:17px; font-weight:700; line-height:1.2; text-decoration:none; cursor:pointer; transition:filter .15s; box-sizing:border-box; }
.egb-qo-submit:hover { filter:brightness(.93); color:#fff; }
.egb-qo-submit[aria-busy=true] { pointer-events:none; filter:saturate(.6); }
.egb-qo-submit[aria-busy=true]::before { content:""; width:18px; height:18px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:egb-qo-spin .7s linear infinite; }
@keyframes egb-qo-spin { to { transform:rotate(360deg); } }
.egb-qo-steps { display:flex; flex-direction:column; gap:6px; margin:0; padding:0; list-style:none; counter-reset:egbqo; }
.egb-qo-steps li { position:relative; padding-left:28px; color:var(--egb-qo-muted); font-size:13px; line-height:1.45; counter-increment:egbqo; }
.egb-qo-steps li::before { content:counter(egbqo); position:absolute; left:0; top:0; width:19px; height:19px; border-radius:50%; background:var(--egb-qo-mist); color:var(--egb-qo-blue); font-size:11px; font-weight:700; line-height:19px; text-align:center; }
.egb-qo-legal { margin:0; color:var(--egb-qo-muted); font-size:12px; line-height:1.45; }
.egb-qo-legal a { color:inherit; }
.egb-qo-done { display:flex; flex-direction:column; align-items:center; gap:12px; padding:8px 0 4px; text-align:center; outline:0; }
.egb-qo-done[hidden] { display:none; }
.egb-qo-done p { margin:0; color:var(--egb-qo-muted); font-size:15px; line-height:1.5; }
.egb-qo-done-call a { color:var(--egb-qo-ink); font-weight:700; white-space:nowrap; }
.egb-qo-done-icon { display:flex; align-items:center; justify-content:center; width:64px; height:64px; border-radius:50%; background:#e3f5ea; color:#0f6b3a; }
.egb-qo-done-icon svg { width:34px; height:34px; }
.egb-qo-done-actions { display:flex; flex-direction:column; gap:8px; width:100%; margin-top:6px; }
.egb-qo-secondary { min-height:48px; border:1px solid var(--egb-qo-line); border-radius:8px; background:#fff; color:var(--egb-qo-ink); font-family:inherit; font-size:15px; font-weight:600; cursor:pointer; }
html.egb-qo-lock,html.egb-qo-lock body { overflow:hidden; }
@media (prefers-reduced-motion:reduce) { .egb-qo-sheet { animation:none; } }