/* Bison – thông báo thêm vào giỏ (PC: khung dưới icon giỏ; mobile: bảng trượt từ đáy) */
.bco-toast {
  --bt-red: #C8161D; --bt-red-d: #9E1016; --bt-black: #141414; --bt-text3: #4A4A4A; --bt-line: #EEEEEE; --bt-ok: #1F7A3A; --bt-zalo: #015CE0;
  position: fixed; inset: 0; z-index: 100000; pointer-events: none;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif; color: var(--bt-black);
}
.bco-toast[hidden] { display: none !important; }
.bco-toast *, .bco-toast *::before, .bco-toast *::after { box-sizing: border-box; }
.bco-toast__backdrop { display: none; }

.bco-toast__panel {
  position: fixed; top: 96px; right: 24px; width: 430px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  pointer-events: auto; overflow: visible; animation: bco-toast-in .22s ease-out;
}
.bco-toast.is-fail .bco-toast__panel { border: 2px solid var(--bt-red); }
.bco-toast__arrow { position: absolute; top: -8px; right: 60px; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.bco-toast.is-fail .bco-toast__arrow { border-top: 2px solid var(--bt-red); border-left: 2px solid var(--bt-red); top: -10px; }
.bco-toast__grip { display: none; }
.bco-toast__ok, .bco-toast__fail { position: relative; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.bco-toast__ok[hidden], .bco-toast__fail[hidden] { display: none; }
.bco-toast__head { display: flex; align-items: center; gap: 10px; }
.bco-toast__head strong { flex: 1; font-size: 18px; font-weight: 800; line-height: 1.3; }
.bco-toast__fail .bco-toast__head strong { color: var(--bt-red-d); }
.bco-toast__tick { width: 28px; height: 28px; border-radius: 50%; background: var(--bt-ok); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.bco-toast__alert { color: var(--bt-red); display: flex; }
.bco-toast__x { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #F4F4F4; color: var(--bt-black); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.bco-toast__x:hover { background: #E6E6E6; }
.bco-toast__item { display: flex; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--bt-line); }
.bco-toast__item img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: #F4F4F4; flex: none; }
.bco-toast__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 15px; }
.bco-toast__info > strong { font-size: 16px; line-height: 1.4; }
.bco-toast__variant { font-size: 14px; color: var(--bt-text3); }
.bco-toast__variant:empty { display: none; }
.bco-toast__price { color: var(--bt-red); }
.bco-toast__sum { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--bt-text3); }
.bco-toast__sum strong { color: var(--bt-black); }
.bco-toast__msg { margin: 0; font-size: 16px; line-height: 1.5; }
.bco-toast__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bco-toast__btn {
  min-height: 50px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 700; text-decoration: none !important; cursor: pointer; line-height: 1.2; text-align: center; margin: 0;
}
.bco-toast__btn--ghost { background: #fff; color: var(--bt-black) !important; border: 1.5px solid var(--bt-black); }
.bco-toast__btn--ghost:hover { background: #F4F4F4; }
.bco-toast__btn--red { background: var(--bt-red); color: #fff !important; border: 0; }
.bco-toast__btn--red:hover { background: var(--bt-red-d); }
.bco-toast__btn--zalo { background: var(--bt-zalo); color: #fff !important; border: 0; }
.bco-toast__btn--zalo:hover { background: #0049B3; }
.bco-toast__btn img { width: 24px; height: 24px; border-radius: 6px; }
.bco-toast__only-mb { display: none; }
.bco-toast__bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--bt-red); border-radius: 0 0 0 16px; transform-origin: left; }
.bco-toast.is-timing .bco-toast__bar { animation: bco-toast-bar var(--bt-sec, 6s) linear forwards; }
.bco-toast.is-paused .bco-toast__bar { animation-play-state: paused; }
.bco-toast.is-fail .bco-toast__bar { display: none; }
.bco-toast__btn:focus-visible, .bco-toast__x:focus-visible { outline: 3px solid var(--bt-zalo); outline-offset: 2px; }

@keyframes bco-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes bco-toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Icon giỏ nảy nhẹ khi số thay đổi (thêm class vào icon giỏ của header) */
.bco-bump { animation: bco-bump .6s ease; box-shadow: 0 0 0 5px rgba(200, 22, 29, .2) !important; border-radius: 999px; }
@keyframes bco-bump { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.18); } 60% { transform: scale(.94); } }

/* Gói này thay cho thông báo đơn giản của header Bison */
body.bco-on .bhs-toast { display: none !important; }

@media (max-width: 767px) {
  .bco-toast { pointer-events: auto; }
  .bco-toast__backdrop { display: block; position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background: rgba(20, 20, 20, .5); cursor: default; }
  .bco-toast__panel {
    top: auto !important; left: 0 !important; right: 0 !important; bottom: 0; width: 100%; max-width: none;
    border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: bco-toast-up .25s ease-out; box-shadow: none;
  }
  .bco-toast.is-fail .bco-toast__panel { border: 0; border-top: 4px solid var(--bt-red); }
  .bco-toast__arrow { display: none; }
  .bco-toast__grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: #CFCFCF; margin: 10px auto -6px; }
  .bco-toast__ok, .bco-toast__fail { padding: 14px 16px 20px; }
  .bco-toast__item img { width: 72px; height: 72px; }
  .bco-toast__sum { padding-top: 0; }
  .bco-toast__btn { min-height: 52px; border-radius: 12px; }
  .bco-toast__only-mb { display: flex; }
  .bco-toast__only-pc { display: none; }
  .bco-toast__bar { display: none; }
  html.bco-toast-lock, html.bco-toast-lock body { overflow: hidden; }
}
@keyframes bco-toast-up { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .bco-toast__panel, .bco-bump { animation: none !important; }
}
