/* BestSavings community (bs-core 1.7.8). Site tokens; dark default, light via html[data-theme=light]. */
.bs-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Toasts (Material snackbar with the site's ink border and gold offset shadow) */
.bs-tst-box { position: fixed; z-index: 100001; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.bs-tst { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 8px 10px 14px; border: 2px solid var(--bs-ink, #0e1712); border-radius: 12px; background: var(--md-on-surface, #eef4ef); color: var(--md-surface, #0e1712); box-shadow: 4px 4px 0 var(--bs-gold, #f0c04f); font-size: .9375rem; line-height: 1.35; pointer-events: auto; opacity: 0; transform: translateY(12px); transition: opacity .2s ease-out, transform .25s cubic-bezier(.2, 1.4, .4, 1); }
.bs-tst.is-in { opacity: 1; transform: none; }
.bs-tst-big { padding-top: 14px; padding-bottom: 14px; font-size: 1rem; }
.bs-tst-ic { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: var(--bs-gold, #f0c04f); color: #1f1600; }
.bs-tst-big .bs-tst-ic { animation: bs-tst-pop .5s cubic-bezier(.2, 1.6, .4, 1) .1s both; }
.bs-tst-draw { stroke-dasharray: 24; stroke-dashoffset: 24; animation: bs-tst-draw .4s ease-out .15s forwards; }
.bs-tst-m { flex: 1 1 auto; min-width: 0; }
.bs-tst-x { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.bs-tst-x:hover { background: rgba(0, 0, 0, .08); }
.bs-tst-x:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); }
@keyframes bs-tst-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
@keyframes bs-tst-draw { to { stroke-dashoffset: 0; } }

/* Welcome back strip under the header */
.bs-wb { display: flex; align-items: center; gap: 8px; max-width: var(--wp--style--global--wide-size, 1240px); margin: 12px auto 0; padding: 6px 6px 6px 16px; border: 2px solid var(--bs-card-border, #000); border-radius: 12px; background: var(--md-surface-container, #16251c); color: var(--md-on-surface, #eef4ef); box-sizing: border-box; width: calc(100% - 32px); animation: bs-wb-in .3s ease-out; transition: opacity .2s; }
.bs-wb p { flex: 1 1 auto; margin: 0; font-size: .9375rem; line-height: 1.4; }
.bs-wb a { color: var(--md-primary, #43c783); font-weight: 700; }
.bs-wb-x { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 1.5rem; cursor: pointer; }
.bs-wb-x:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); }
.bs-wb.is-out { opacity: 0; }
@keyframes bs-wb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Vote bounce + report flag in the vote widget */
.bs-vote-pop { animation: bs-vote-pop .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bs-vote-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) translateY(-2px); } 100% { transform: scale(1); } }
.bs-vote .bs-report-b { opacity: .7; margin-left: 2px; }
.bs-vote .bs-report-b:hover, .bs-vote .bs-report-b:focus-visible { opacity: 1; }
.bs-link-btn { padding: 0; border: 0; background: none; color: var(--md-primary, #43c783); font: inherit; font-size: .875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.bs-pd-report { margin: 4px 0 0; }

/* Dialogs */
.bs-dlg { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 2px solid var(--bs-ink, #0e1712); border-radius: 16px; background: var(--md-surface-container, #16251c); color: var(--md-on-surface, #eef4ef); box-shadow: 6px 6px 0 var(--bs-gold, #f0c04f); }
.bs-dlg::backdrop { background: rgba(5, 12, 8, .6); }
.bs-dlg[open] { animation: bs-dlg-in .2s ease-out; }
@keyframes bs-dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.bs-dlg-f { display: flex; flex-direction: column; gap: 12px; padding: 20px; margin: 0; }
.bs-dlg-h { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.bs-dlg-p { margin: 0; color: var(--md-on-surface-variant, #b3c5ba); font-size: .9375rem; }
.bs-dlg-opts { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; }
.bs-dlg-opts label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; cursor: pointer; }
.bs-dlg-opts label:hover { background: rgba(67, 199, 131, .12); }
.bs-dlg-opts input { width: 20px; height: 20px; accent-color: var(--md-primary, #43c783); }
.bs-dlg-l { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .875rem; }
.bs-dlg-opt { font-weight: 400; color: var(--md-on-surface-variant, #b3c5ba); }
.bs-dlg-l select, .bs-dlg-l textarea, .bs-dlg-l input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--md-outline, #8fa597); border-radius: 10px; background: var(--md-surface, #0e1712); color: var(--md-on-surface, #eef4ef); font: inherit; font-weight: 400; font-size: 1rem; }
.bs-dlg-l textarea { resize: vertical; min-height: 110px; }
.bs-dlg-l select:focus, .bs-dlg-l textarea:focus, .bs-dlg-l input:focus { outline: 2px solid var(--bs-gold, #f0c04f); outline-offset: 1px; border-color: var(--bs-gold, #f0c04f); }
.bs-dlg-page { margin: 0; font-size: .8125rem; color: var(--md-on-surface-variant, #b3c5ba); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-dlg-page span { font-family: ui-monospace, monospace; }
.bs-dlg-err { margin: 0; padding: 8px 12px; border-radius: 8px; background: rgba(229, 83, 75, .15); color: var(--md-on-surface, #eef4ef); font-size: .875rem; }
.bs-dlg-a { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.bs-dlg-btn { min-height: 44px; padding: 0 18px; border: 2px solid var(--bs-ink, #0e1712); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.bs-dlg-ok { background: var(--md-primary, #43c783); color: var(--md-on-primary, #06210f); }
.bs-dlg-btn:focus-visible { outline: 3px solid var(--bs-gold, #f0c04f); outline-offset: 2px; }
.bs-dlg-btn[disabled] { opacity: .6; cursor: wait; }

/* "Provide feedback" in the menu overlay */
.bs-fb-menu { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--md-outline-variant, rgba(143, 165, 151, .35)); }
.bs-fb-open { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 2px solid var(--bs-ink, #0e1712); border-radius: 999px; background: var(--bs-gold, #f0c04f); color: #1f1600; font: inherit; font-weight: 700; cursor: pointer; }
.bs-fb-open:hover { filter: brightness(1.05); }
.bs-fb-open:focus-visible { outline: 3px solid var(--md-on-surface, #fff); outline-offset: 2px; }

html[data-theme="light"] .bs-tst-x:hover { background: rgba(255, 255, 255, .12); }
@media (prefers-reduced-motion: reduce) {
	.bs-tst, .bs-wb, .bs-dlg[open] { transition: none; animation: none; }
	.bs-tst-big .bs-tst-ic, .bs-vote-pop { animation: none; }
	.bs-tst-draw { animation: none; stroke-dashoffset: 0; }
}
