/* Banner / popup cookie + khung chặn nội dung bên thứ ba */
.bm-cookie-banner, .bm-cookie-modal, .bm-consent-ph { --bm-accent: var(--color-red, #ec2d3f); --bm-accent-d: var(--color-dark-red, #c31829); --bm-text: #1f2430; --bm-mut: #6b7280; --bm-line: #e6e8ee; font-family: inherit; }
.bm-cookie-banner { position: fixed; left: 20px; bottom: 20px; z-index: 100000; width: min(420px, calc(100vw - 32px)); background: #fff; color: var(--bm-text); border-radius: 18px; padding: 18px 18px 16px; box-shadow: 0 18px 50px rgba(15, 23, 42, .22), 0 2px 8px rgba(15, 23, 42, .08); border: 1px solid var(--bm-line); transform: translateY(24px); opacity: 0; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s; }
.bm-cookie-banner.is-show { transform: none; opacity: 1; }
.bm-cb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; }
.bm-cb-ico { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bm-accent) 12%, #fff); color: var(--bm-accent); font-size: 18px; flex: none; }
.bm-cookie-banner p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: #3f4756; }
.bm-cookie-banner p a { color: var(--bm-accent); text-decoration: underline; }
.bm-cb-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bm-btn { border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1; padding: 11px 16px; border-radius: 10px; transition: background .15s, box-shadow .15s, transform .1s, color .15s; }
.bm-btn:active { transform: translateY(1px); }
.bm-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--bm-accent) 40%, transparent); outline-offset: 2px; }
.bm-btn-primary { background: var(--bm-accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--bm-accent) 35%, transparent); }
.bm-btn-primary:hover { background: var(--bm-accent-d); }
.bm-btn-ghost { background: #fff; color: var(--bm-text); box-shadow: inset 0 0 0 1.5px #cfd4de; }
.bm-btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--bm-accent); color: var(--bm-accent); }
.bm-btn-link { background: transparent; color: var(--bm-mut); padding-left: 6px; padding-right: 6px; text-decoration: underline; }
.bm-btn-link:hover { color: var(--bm-accent); }
/* Modal */
.bm-cookie-modal { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
.bm-cookie-modal.is-show { visibility: visible; opacity: 1; }
.bm-cm-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(3px); }
.bm-cm-card { position: relative; width: min(560px, 100%); max-height: min(90vh, 720px); display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(15, 23, 42, .35); transform: translateY(14px) scale(.98); transition: transform .25s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.bm-cookie-modal.is-show .bm-cm-card { transform: none; }
.bm-cm-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--bm-line); }
.bm-cm-head b { font-size: 18px; color: var(--bm-text); display: block; }
.bm-cm-head small { color: var(--bm-mut); font-size: 13px; }
.bm-cm-x { border: 0; background: #f2f4f8; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: #4b5563; flex: none; }
.bm-cm-x:hover { background: #e6e9f0; }
.bm-cm-body { padding: 8px 14px; overflow: auto; }
.bm-cat { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid #f0f1f5; cursor: pointer; margin: 0; }
.bm-cat:last-child { border-bottom: 0; }
.bm-cat-ico { width: 38px; height: 38px; border-radius: 12px; background: #f4f6fb; color: #4b5563; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.bm-cat-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bm-cat-txt b { font-size: 14.5px; color: var(--bm-text); }
.bm-cat-txt small { font-size: 12.5px; color: var(--bm-mut); line-height: 1.45; }
.bm-switch { position: relative; width: 44px; height: 26px; flex: none; }
.bm-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.bm-switch i { position: absolute; inset: 0; border-radius: 99px; background: #cfd4de; transition: background .2s; }
.bm-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.bm-switch input:checked + i { background: var(--bm-accent); }
.bm-switch input:checked + i::after { transform: translateX(18px); }
.bm-switch input:disabled { cursor: not-allowed; }
.bm-switch input:disabled + i { opacity: .55; }
.bm-switch input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--bm-accent) 40%, transparent); outline-offset: 2px; }
.bm-cm-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--bm-line); background: #fafbfd; }
.bm-cm-foot > a { color: var(--bm-accent); font-size: 13px; text-decoration: underline; }
.bm-cm-foot > span { display: flex; flex-wrap: wrap; gap: 8px; }
html.bm-cm-open { overflow: hidden; }
/* Khung nội dung bị chặn */
.bm-consent-ph { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 8px 0; border: 1.5px dashed #cfd4de; border-radius: 14px; background: #f8f9fc; color: var(--bm-text); }
.bm-consent-ph > i { font-size: 20px; color: var(--bm-mut); }
.bm-consent-ph > div { flex: 1; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.45; }
.bm-consent-ph > div span { color: var(--bm-mut); font-size: 12.5px; }
.bm-consent-ph.is-compact { padding: 12px 14px; }
.bm-consent-ph .bm-btn { padding: 9px 14px; flex: none; }
.bm-consent-content { max-width: 100%; }
@media (max-width: 575px) {
  .bm-cookie-banner { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 16px; }
  .bm-cb-actions .bm-btn-primary, .bm-cb-actions .bm-btn-ghost { flex: 1 1 auto; text-align: center; }
  .bm-cm-foot { flex-direction: column; align-items: stretch; }
  .bm-cm-foot > span .bm-btn { flex: 1 1 auto; }
  .bm-consent-ph { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .bm-cookie-banner, .bm-cm-card, .bm-cookie-modal, .bm-switch i, .bm-switch i::after { transition: none; } }
