/* Sale alerts are a local demo. Keep one scroll region below the fixed tabs. */
dialog.drawer.sale-alert-dialog {
  inset: 16px 16px 16px auto;
  width: 480px;
  max-width: calc(100vw - 32px);
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 0;
  border-radius: 24px;
  background: var(--bg-page);
}
dialog.sale-alert-dialog > .modal-header { padding: 20px 22px 16px; border: 0; }
dialog.sale-alert-dialog .modal-header h2 { font-size: 21px; }
dialog.sale-alert-dialog .modal-header .eyebrow { color: var(--logo-accent); font-size: 11px; letter-spacing: .03em; }
.sale-alert-host, .sale-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.sale-panel { overflow: hidden; }
.sale-panel [hidden] { display: none !important; }
.sale-demo-note { display: flex; align-items: center; gap: 9px; flex-shrink: 0; padding: 0 22px 16px; background: var(--bg-surface); }
.sale-demo-note p { color: var(--text-secondary); font-size: 11px; line-height: 1.6; word-break: keep-all; }
.sale-demo-badge { flex-shrink: 0; padding: 3px 6px; border-radius: 5px; background: var(--bg-subtle); color: var(--text-secondary); font-size: 9px; font-weight: 750; letter-spacing: .04em; }
.sale-tabs { display: flex; flex-shrink: 0; gap: 4px; padding: 5px; margin: 16px 22px 0; border-radius: 14px; background: #e9ecf1; }
.sale-tabs button { flex: 1; min-width: 0; min-height: 42px; padding: 9px 10px; border-radius: 10px; color: var(--text-secondary); font-size: 13px; font-weight: 650; transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.sale-tabs button[aria-pressed="true"] { color: var(--text-primary); background: var(--bg-surface); box-shadow: 0 2px 8px rgb(24 30 41 / 6%); }
.sale-tabs button > span { margin-left: 3px; color: var(--logo-accent); font-size: 12px; font-variant-numeric: tabular-nums; }
.sale-scroll { flex: 1; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 24px 22px; scrollbar-gutter: stable; scroll-padding: 20px; }
.sale-scroll:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.sale-inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sale-inbox-heading > div { flex: 1; min-width: 0; }
.sale-inbox-heading h3, .sale-preview-title { font-size: 17px; font-weight: 750; letter-spacing: -.5px; }
.sale-inbox-heading p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; line-height: 1.65; }
.sale-text-button { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 8px 4px; border-radius: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 600; line-height: 1.5; }
.sale-text-button .icon { width: 15px; height: 15px; }
.sale-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sale-primary, .sale-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 11px 15px; border-radius: 12px; font-size: 13px; font-weight: 650; line-height: 1.5; text-align: center; transition: background 150ms ease, transform 150ms ease; }
.sale-primary { background: var(--logo-accent); color: white; box-shadow: 0 3px 10px rgb(37 99 235 / 12%); }
.sale-secondary { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-card); }
.sale-primary .icon, .sale-secondary .icon { width: 17px; height: 17px; }
.sale-toolbar > .sale-primary { flex: 1; }
.sale-toolbar > .sale-secondary { flex-shrink: 0; }
.sale-settings-summary { margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; background: #eaf0fc; color: #355a9e; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.sale-settings-summary strong { font-weight: 700; }
.sale-inbox-heading .sale-settings-summary { margin: 6px 0 0; padding: 0; background: none; color: var(--text-secondary); }
.sale-empty { display: flex; align-items: center; flex-direction: column; padding: 34px 20px 38px; text-align: center; background: var(--bg-surface); border-radius: 20px; box-shadow: var(--shadow-card); }
.sale-empty-symbol { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 18px; border-radius: 21px; background: #edf2ff; color: var(--logo-accent); transform: rotate(-7deg); }
.sale-empty-symbol .icon, .sale-empty-symbol svg { width: 27px; height: 27px; }
.sale-empty h3 { font-size: 17px; line-height: 1.5; font-weight: 750; letter-spacing: -.5px; }
.sale-empty p { max-width: 280px; margin-top: 10px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; word-break: keep-all; }
.sale-empty > button { margin-top: 20px; }
.sale-notifications { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.sale-notification { position: relative; min-width: 0; padding: 18px; border-radius: 18px; background: var(--bg-surface); box-shadow: var(--shadow-card); }
.sale-notification.is-unread { box-shadow: 0 4px 20px rgb(37 99 235 / 7%), 0 1px 4px rgb(24 30 41 / 3%); }
.sale-notification.is-unread::before { content: ''; position: absolute; top: 23px; left: 0; width: 3px; height: 25px; border-radius: 0 3px 3px 0; background: var(--logo-accent); }
.sale-event-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; color: var(--text-secondary); }
.sale-event-top > small { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; font-size: 11px; font-weight: 600; line-height: 1.5; }
.sale-platform-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; color: var(--text-primary); background: var(--bg-subtle); font-size: 9px; font-weight: 800; letter-spacing: -.6px; }
.sale-event-status { flex-shrink: 0; padding: 4px 7px; border-radius: 6px; background: #edf2ff; color: var(--logo-accent); font-size: 10px; font-weight: 700; white-space: nowrap; }
.sale-event-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sale-event-main > div { flex: 1; min-width: 0; }
.sale-event-main h3 { font-size: 17px; font-weight: 750; line-height: 1.5; letter-spacing: -.5px; overflow-wrap: anywhere; }
.sale-event-main p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.sale-discount { flex-shrink: 0; color: var(--logo-accent); font-size: 30px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.15; text-align: right; font-variant-numeric: tabular-nums; }
.sale-discount small { color: inherit; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.sale-discount small:first-child { display: block; margin-bottom: 5px; color: var(--text-tertiary); font-size: 10px; font-weight: 550; }
.sale-discount small:last-child { display: inline; margin-left: 2px; }
.sale-event-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 4px; }
.sale-event-bottom time, .sale-event-bottom > p { min-width: 0; color: var(--text-tertiary); font-size: 11px; line-height: 1.6; }
.sale-event-bottom > div { min-width: 0; }
.sale-event-bottom > div > strong { color: var(--text-primary); font-size: 12px; font-weight: 650; line-height: 1.6; }
.sale-event-bottom > div > p { margin-top: 3px; color: var(--text-tertiary); font-size: 10px; line-height: 1.6; }
.sale-event-bottom .sale-text-button { color: var(--logo-accent); }
.sale-notification.is-expired .sale-event-status { background: var(--bg-subtle); color: var(--text-tertiary); }
.sale-notification.is-expired .sale-discount { color: var(--text-tertiary); }
.sale-inline-note { margin-top: 10px; color: var(--text-secondary); font-size: 11px; line-height: 1.7; word-break: keep-all; }
.sale-feedback { margin-top: 12px; color: var(--logo-accent); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.sale-feedback:empty { display: none; }
.sale-setting-card { display: grid; gap: 22px; min-width: 0; margin-bottom: 16px; padding: 20px; border-radius: 18px; background: var(--bg-surface); box-shadow: var(--shadow-card); }
.sale-setting-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.sale-setting-heading > div { flex: 1; min-width: 0; }
.sale-setting-heading h3 { font-size: 16px; font-weight: 750; line-height: 1.5; }
.sale-setting-heading p { margin-top: 6px; color: var(--text-secondary); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.sale-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; min-width: 48px; min-height: 44px; cursor: pointer; }
.sale-toggle input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.sale-toggle > span { position: relative; display: block; width: 44px; height: 26px; border-radius: 20px; background: #d5d9e0; transition: background 150ms ease; }
.sale-toggle > span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(24 30 41 / 14%); transition: transform 150ms ease; }
.sale-toggle input:checked + span { background: var(--logo-accent); }
.sale-toggle input:checked + span::before { transform: translateX(18px); }
.sale-toggle input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.sale-toggle input:disabled + span { opacity: .45; cursor: not-allowed; }
.sale-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sale-fieldset + .sale-fieldset { margin-top: 24px; }
.sale-fieldset legend { padding: 0; margin-bottom: 8px; color: var(--text-primary); font-size: 14px; font-weight: 700; }
.sale-fieldset > p { margin-bottom: 12px; color: var(--text-secondary); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.sale-scope-options { display: grid; gap: 8px; }
.sale-choice { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 12px; border-radius: 12px; background: var(--bg-surface); box-shadow: 0 2px 10px rgb(24 30 41 / 3%); cursor: pointer; }
.sale-choice:has(input:checked) { background: #edf2ff; }
.sale-choice input { flex-shrink: 0; width: 17px; height: 17px; margin: 0; accent-color: var(--logo-accent); }
.sale-choice > span { display: block; min-width: 0; }
.sale-choice strong { display: block; font-size: 13px; font-weight: 650; line-height: 1.5; }
.sale-choice small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 11px; line-height: 1.6; word-break: keep-all; }
.sale-choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.sale-chip { position: relative; display: inline-flex; min-width: 0; max-width: 100%; cursor: pointer; }
.sale-chip input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.sale-chip > span { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 13px; border-radius: 11px; background: var(--bg-subtle); color: var(--text-secondary); font-size: 12px; font-weight: 600; line-height: 1.5; transition: background 150ms ease, color 150ms ease; }
.sale-chip input:checked + span { color: #1e50b7; background: #e6eeff; }
.sale-chip input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.sale-chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.sale-discount-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; color: var(--text-primary); font-size: 14px; font-weight: 650; }
.sale-discount-control select { min-width: 110px; min-height: 44px; padding: 10px 30px 10px 12px; border: 0; border-radius: 10px; background: var(--bg-subtle); color: var(--text-primary); font-size: 13px; font-weight: 600; }
.sale-settings-hint { margin-top: 12px; color: var(--text-secondary); font-size: 12px; line-height: 1.8; word-break: keep-all; }
.sale-settings-hint strong { color: var(--text-primary); }
.sale-panel-footer, .sale-settings-footer { flex-shrink: 0; padding: 16px 22px max(16px, env(safe-area-inset-bottom)); background: var(--bg-surface); box-shadow: 0 -4px 20px rgb(24 30 41 / 4%); }
.sale-settings-footer { display: flex; gap: 8px; }
.sale-panel-footer > .sale-settings-footer { padding: 0; box-shadow: none; }
.sale-settings-footer > button { flex: 1; min-height: 46px; }
.sale-settings-footer .sale-secondary { background: var(--bg-subtle); box-shadow: none; }
.sale-panel-footer > p { color: var(--text-secondary); font-size: 11px; line-height: 1.7; word-break: keep-all; }
.sale-panel-footer > .sale-inline-note { margin: 0; }
.sale-panel-footer .sale-feedback { margin: 0 0 10px; color: var(--logo-accent); }
.sale-preview-title { margin: 28px 0 12px; font-size: 14px; }
.sale-preview-title > span { margin-left: 3px; color: var(--text-tertiary); font-size: 12px; font-weight: 500; }
.sale-preview-list { display: grid; gap: 10px; }
.sale-preview-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 16px; border-radius: 15px; background: var(--bg-surface); box-shadow: var(--shadow-card); }
.sale-preview-card > div { flex: 1; min-width: 0; }
.sale-preview-card > div > small { display: block; color: var(--text-tertiary); font-size: 10px; line-height: 1.6; }
.sale-preview-card h4 { margin: 5px 0 0; color: var(--text-primary); font-size: 14px; font-weight: 700; line-height: 1.5; }
.sale-preview-card > div > p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; word-break: keep-all; }
.sale-preview-card > strong { flex-shrink: 0; color: var(--logo-accent); font-size: 16px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sale-preview-card .sale-event-top { margin-bottom: 10px; }
.sale-preview-card .sale-event-main h3 { font-size: 14px; }
.sale-preview-card .sale-event-main p { font-size: 11px; }
.sale-preview-card .sale-discount { font-size: 24px; }
.sale-bell { position: relative; flex-shrink: 0; }
.sale-unread-badge { position: absolute; top: 1px; right: 0; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: var(--logo-accent); color: white; box-shadow: 0 0 0 2px white; font-size: 10px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.sale-unread-badge[hidden] { display: none; }
.sale-entry-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 82px; margin: 0 0 16px; padding: 17px 16px; border: 0; border-radius: 20px; background: var(--bg-surface); box-shadow: var(--shadow-card); text-align: left; transition: transform 180ms ease, box-shadow 180ms ease; }
.sale-entry-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 14px; color: var(--logo-accent); background: #edf2ff; }
.sale-entry-icon .icon { width: 20px; height: 20px; }
.sale-entry-copy { flex: 1; min-width: 0; }
.sale-entry-copy strong { display: block; color: var(--text-primary); font-size: 14px; font-weight: 700; line-height: 1.5; }
.sale-entry-copy strong em { display: inline-block; margin-left: 3px; padding: 2px 4px; border-radius: 4px; background: var(--bg-subtle); color: var(--text-tertiary); font-size: 8px; font-style: normal; font-weight: 700; letter-spacing: .03em; vertical-align: 2px; }
.sale-entry-copy small { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 11px; line-height: 1.6; word-break: keep-all; }
.sale-entry-card > .icon { width: 16px; height: 16px; color: var(--text-tertiary); }
@media (hover: hover) {
  .sale-text-button:not(:disabled):hover { color: var(--logo-accent); background: #edf2ff; }
  .sale-primary:not(:disabled):hover { background: #1d55d0; }
  .sale-secondary:not(:disabled):hover { background: #edf2ff; }
  .sale-chip:hover > span { background: #e6eaf0; }
  .sale-chip:has(input:checked):hover > span { background: #dbe7ff; }
  .sale-entry-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
}
.sale-primary:not(:disabled):active, .sale-secondary:not(:disabled):active { transform: scale(.98); }
@media (max-width: 700px) {
  dialog.drawer.sale-alert-dialog { inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog.sale-alert-dialog > .modal-header { padding: max(16px, env(safe-area-inset-top)) 18px 12px; }
  .sale-demo-note { padding: 0 18px 14px; }
  .sale-tabs { margin: 14px 16px 0; }
  .sale-scroll { padding: 20px 16px; scrollbar-gutter: auto; }
  .sale-panel-footer, .sale-settings-footer { padding: 14px 16px max(14px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  /* The same prototype guide remains available in the catalog footer. */
  .header-actions [data-action="about"] { display: none; }
  dialog.sale-alert-dialog > .modal-header { padding-inline: 14px; }
  dialog.sale-alert-dialog .modal-header h2 { font-size: 19px; }
  .sale-demo-note { padding-inline: 14px; }
  .sale-demo-note p { font-size: 10px; }
  .sale-scroll { padding: 18px 12px; }
  .sale-tabs { margin-inline: 12px; }
  .sale-setting-card { padding: 16px; }
  .sale-notification { padding: 16px; }
  .sale-event-main { gap: 10px; }
  .sale-event-main h3 { font-size: 16px; }
  .sale-discount { font-size: 27px; }
  .sale-toolbar { gap: 7px; }
  .sale-primary, .sale-secondary { padding-inline: 10px; font-size: 12px; }
  .sale-chip > span { padding-inline: 11px; }
  .sale-discount-control { font-size: 13px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sale-tabs button, .sale-primary, .sale-secondary, .sale-toggle > span, .sale-toggle > span::before, .sale-chip > span, .sale-entry-card { transition: none; }
  .sale-entry-card:hover, .sale-primary:active, .sale-secondary:active { transform: none; }
}
