/* banner.css — VEŘEJNÝ vzhled banneru (okno + lišta). Vzhled lze přebít v CSS webu proměnnými níže. */
.bnr {
  --bnr-accent: #f59e0b; --bnr-on-accent: #111; --bnr-bg: #fff; --bnr-fg: #151515; --bnr-radius: 16px;
  --bnr-w: min(560px, 92vw); --bnr-maxh: 86vh; --bnr-z: 2147483000;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--bnr-fg);
}
.bnr *, .bnr *::before, .bnr *::after { box-sizing: border-box; }

/* okno */
.bnr-popup { position: fixed; inset: 0; z-index: var(--bnr-z); display: grid; place-items: center; padding: 16px; overscroll-behavior: contain; }
.bnr-back { position: absolute; inset: 0; background: rgba(8, 10, 14, .64); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .35s ease; cursor: pointer; }
.bnr-card {
  position: relative; width: var(--bnr-w); max-height: var(--bnr-maxh); overflow: auto; outline: none;
  background: var(--bnr-bg); border-radius: var(--bnr-radius); box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(26px) scale(.95); transition: transform .5s cubic-bezier(.2, .9, .25, 1.12), opacity .3s ease;
}
.bnr.is-in .bnr-back { opacity: 1; }
.bnr.is-in .bnr-card { opacity: 1; transform: none; }
.bnr.is-out .bnr-back { opacity: 0; } .bnr.is-out .bnr-card { opacity: 0; transform: translateY(14px) scale(.97); }
.bnr-card.has-img:not(.has-body) { background: transparent; box-shadow: none; overflow: visible; }
.bnr-media { display: block; line-height: 0; border-radius: inherit; }
.bnr-img { display: block; width: 100%; height: auto; max-height: calc(var(--bnr-maxh) - 8px); object-fit: contain; border-radius: var(--bnr-radius); box-shadow: 0 30px 90px rgba(0, 0, 0, .5); }
.bnr-card.has-body .bnr-img { border-radius: var(--bnr-radius) var(--bnr-radius) 0 0; box-shadow: none; max-height: 52vh; object-fit: cover; }
a.bnr-media { cursor: pointer; transition: transform .25s ease; } a.bnr-media:hover { transform: scale(1.012); }
.bnr-body { padding: 22px 26px 26px; }
.bnr-title { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.01em; }
.bnr-text { margin: 0 0 18px; color: color-mix(in srgb, var(--bnr-fg) 78%, transparent); }
.bnr-text:last-child { margin-bottom: 0; }
.bnr-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--bnr-accent); color: var(--bnr-on-accent); font-weight: 700; text-decoration: none; transition: transform .15s, filter .15s; }
.bnr-btn:hover, .bnr-btn:focus-visible { filter: brightness(1.07); transform: translateY(-1px); }
.bnr-x {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(10, 12, 16, .72); color: #fff; cursor: pointer; transition: background .15s, transform .15s; -webkit-tap-highlight-color: transparent;
}
.bnr-x:hover, .bnr-x:focus-visible { background: rgba(10, 12, 16, .95); transform: scale(1.06); outline: 2px solid var(--bnr-accent); outline-offset: 2px; }
.bnr-card.has-img:not(.has-body) .bnr-x { top: -12px; right: -8px; background: #fff; color: #111; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
body.bnr-lock { overflow: hidden; }

/* lišta */
.bnr-bar { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 52px 10px 16px; background: var(--bnr-accent); color: var(--bnr-on-accent); font-size: .95rem; transform-origin: top; animation: bnr-bar-in .45s cubic-bezier(.2, .9, .25, 1) both; }
.bnr-bar.is-out { animation: bnr-bar-out .25s ease forwards; }
.bnr-bartext { margin: 0; text-align: center; text-wrap: balance; font-weight: 600; }
.bnr-link { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.bnr-bar .bnr-x { top: 50%; right: 8px; width: 34px; height: 34px; margin-top: -17px; background: rgba(0, 0, 0, .14); color: inherit; }
.bnr-bar .bnr-x:hover, .bnr-bar .bnr-x:focus-visible { background: rgba(0, 0, 0, .28); transform: none; }
.bnr-s-warn { --bnr-accent: #dc2626; --bnr-on-accent: #fff; }
.bnr-s-ok { --bnr-accent: #16a34a; --bnr-on-accent: #fff; }
.bnr-s-info { --bnr-accent: #f59e0b; --bnr-on-accent: #111; }
@keyframes bnr-bar-in { from { opacity: 0; transform: translateY(-100%); } }
@keyframes bnr-bar-out { to { opacity: 0; transform: translateY(-100%); } }

@media (max-width: 560px) { .bnr-body { padding: 18px 18px 20px; } .bnr-title { font-size: 1.28rem; } .bnr-bar { padding-left: 12px; font-size: .88rem; } }
@media (prefers-reduced-motion: reduce) { .bnr-back, .bnr-card { transition-duration: .01s; } .bnr-bar { animation: none; } }

/* náhled v administraci: okno uvnitř rámečku místo přes celou stránku */
.bnr-stage { position: relative; overflow: hidden; border-radius: 12px; background: #1e293b; }
.bnr-stage .bnr { --bnr-w: 62%; --bnr-maxh: 300px; }
.bnr-stage .bnr-popup { position: absolute; z-index: 1; padding: 10px; }
.bnr-stage .bnr-back { opacity: 1; } .bnr-stage .bnr-card { opacity: 1; transform: none; }
.bnr-stage .bnr-bar { animation: none; }
