.tsad-banner {
  position: fixed;
  z-index: 2147483000;
  width: calc(100% - 48px);
  color: var(--tsad-text);
  font-family: var(--tsad-font-family);
  pointer-events: none;
}

.tsad-banner[hidden] { display: none !important; }
.tsad-banner *, .tsad-banner *::before, .tsad-banner *::after { box-sizing: border-box; }
.tsad-banner--bottom-left, .tsad-banner--bottom-center, .tsad-banner--bottom-right { bottom: 24px; }
.tsad-banner--top-left, .tsad-banner--top-center, .tsad-banner--top-right { top: 24px; }
.tsad-banner--bottom-left, .tsad-banner--top-left { left: 24px; right: auto; }
.tsad-banner--bottom-center, .tsad-banner--top-center { left: 24px; right: 24px; width: auto; }
.tsad-banner--bottom-right, .tsad-banner--top-right { right: 24px; left: auto; }

.tsad-banner__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(var(--tsad-banner-width), 100%);
  padding: 18px 52px 18px 20px;
  background: var(--tsad-background);
  color: var(--tsad-text);
  border: 1px solid var(--tsad-border);
  border-radius: var(--tsad-radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.tsad-banner--bottom-left .tsad-banner__inner,
.tsad-banner--top-left .tsad-banner__inner { margin-right: auto; }
.tsad-banner--bottom-center .tsad-banner__inner,
.tsad-banner--top-center .tsad-banner__inner { margin-right: auto; margin-left: auto; }
.tsad-banner--bottom-right .tsad-banner__inner,
.tsad-banner--top-right .tsad-banner__inner { margin-left: auto; }

.tsad-banner__icon { width: 42px; height: 42px; }
.tsad-banner__icon svg { display: block; width: 100%; height: 100%; }
.tsad-banner__shield { fill: var(--tsad-accent); }
.tsad-banner__shield-inner { fill: var(--tsad-background); }
.tsad-banner__symbol { fill: var(--tsad-accent); }
.tsad-banner__title { margin: 0 0 5px; color: var(--tsad-text); font: inherit; font-size: 16px; font-weight: 700; line-height: 1.3; }
.tsad-banner__message, .tsad-banner__notice { margin: 0; color: var(--tsad-muted); font: inherit; line-height: 1.5; }
.tsad-banner__message { font-size: 14px; }
.tsad-banner__notice { margin-top: 6px; font-size: 12px; }
.tsad-banner__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tsad-action { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 13px; border-radius: calc(var(--tsad-radius) * 0.6); border: 1px solid transparent; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.tsad-action--primary { background: var(--tsad-accent); color: var(--tsad-accent-text); border-color: var(--tsad-accent); }
.tsad-action--secondary { background: transparent; color: var(--tsad-text); border-color: var(--tsad-border); }
.tsad-action--link { background: transparent; color: var(--tsad-muted); border-color: transparent; }
.tsad-action:focus-visible, .tsad-banner__close:focus-visible { outline: 2px solid var(--tsad-accent); outline-offset: 2px; }
.tsad-action:disabled { opacity: 0.65; cursor: wait; }
.tsad-banner__close { position: absolute; top: 8px; right: 10px; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; padding: 0; background: transparent; color: var(--tsad-muted); border: 0; border-radius: 50%; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }

body.admin-bar .tsad-banner--top-left,
body.admin-bar .tsad-banner--top-center,
body.admin-bar .tsad-banner--top-right { top: 56px; }

@media (max-width: 820px) {
  .tsad-banner { width: calc(100% - 24px); }
  .tsad-banner--bottom-left, .tsad-banner--bottom-center, .tsad-banner--bottom-right { bottom: 12px; }
  .tsad-banner--top-left, .tsad-banner--top-center, .tsad-banner--top-right { top: 12px; }
  .tsad-banner--bottom-left, .tsad-banner--top-left,
  .tsad-banner--bottom-center, .tsad-banner--top-center { left: 12px; right: auto; }
  .tsad-banner--bottom-right, .tsad-banner--top-right { right: 12px; left: auto; }
  body.admin-bar .tsad-banner--top-left,
  body.admin-bar .tsad-banner--top-center,
  body.admin-bar .tsad-banner--top-right { top: 58px; }
  .tsad-banner__inner { grid-template-columns: auto minmax(0, 1fr); padding: 18px 42px 18px 18px; }
  .tsad-banner__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 540px) {
  .tsad-banner { width: calc(100% - 24px); }
  .tsad-banner__inner { grid-template-columns: 1fr; gap: 12px; width: 100%; }
  .tsad-banner__icon { width: 36px; height: 36px; }
  .tsad-banner__actions { display: grid; width: 100%; }
  .tsad-action { width: 100%; }
}
