/* BRUO — okienka na stronie (modals.js): na środku, tło przyciemnione i rozmyte.
 * Układy karty: .is-left (zdjęcie | treść), .is-top (zdjęcie nad treścią), .is-noimg, .is-html.
 * Telefon: okno wysuwane od dołu, zdjęcie jako pasek u góry. Typy: .is-promo, .is-coupon, .is-html, .is-form.
 * Kolory BRUO.eu: granat #003450, żółty #eab308. Bez gradientów, zaokrąglenia max 8px. */

.bcb-overlay { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bcb-backdrop { position: absolute; inset: 0; background: rgba(4, 22, 36, .55);
                -webkit-backdrop-filter: blur(8px) saturate(120%); backdrop-filter: blur(8px) saturate(120%); opacity: 0; transition: opacity .3s ease-out; }
.bcb-overlay.is-open .bcb-backdrop { opacity: 1; }
/* blokada przewijania: --bcb-sw = szerokość zniknionego paska przewijania (ustawia modals.js), brak przeskoku w bok */
html.bcb-lock, html.bcb-lock body { overflow: hidden; }
html.bcb-lock body { padding-right: var(--bcb-sw, 0); }
html.bcb-lock #moderncart-floating-cart { margin-right: var(--bcb-sw, 0); }
html.bcb-lock #wpadminbar { right: var(--bcb-sw, 0); width: auto; }

.bcb { --bcb-navy: #003450; --bcb-navy-2: #0b4a6e; --bcb-y: #eab308; --bcb-y-2: #f5c518; --bcb-ink: #0f1f2e; --bcb-mid: #4b5b6b;
       --bcb-mute: #7a8794; --bcb-field: #f2f5f8; --bcb-line: #e3e9ef; --bcb-ease: cubic-bezier(.2, .8, .2, 1);
       position: relative; display: grid; grid-template-columns: 290px 400px; max-width: 100%; max-height: calc(100vh - 40px);
       overflow: hidden; background: #fff; border-radius: 8px;
       box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 100px -20px rgba(0, 15, 30, .55);
       font-family: inherit; color: var(--bcb-ink); text-align: left;
       opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .35s var(--bcb-ease), transform .45s var(--bcb-ease); }
.bcb-overlay.is-open .bcb { opacity: 1; transform: none; }
.bcb:focus { outline: none; }
.bcb *, .bcb *::before, .bcb *::after { box-sizing: border-box; }
.bcb [hidden] { display: none !important; }
.bcb svg { display: block; flex: none; }
.bcb button { font: inherit; letter-spacing: 0; text-transform: none; box-shadow: none; min-height: 0; line-height: 1.3; }

/* zdjęcie: przy otwarciu powoli „dojeżdża” do kadru */
.bcb-photo { position: relative; margin: 0; overflow: hidden; background: var(--bcb-navy); }
.bcb-photo::before { content: ""; position: absolute; inset: 0; background: inherit; background-image: inherit;
                     background-position: center top; background-size: cover; transform: scale(1.08); transition: transform 1.6s var(--bcb-ease); }
.bcb-overlay.is-open .bcb-photo::before { transform: none; }
.bcb-photo figcaption { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 9px; max-width: calc(100% - 32px);
                        padding: 7px 12px 7px 10px; border-radius: 6px; background: rgba(0, 32, 50, .55);
                        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .18);
                        color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2; }
.bcb-photo figcaption span { width: 8px; height: 8px; border-radius: 50%; background: var(--bcb-y); box-shadow: 0 0 0 4px rgba(234, 179, 8, .25); flex: none; }

/* formularz */
.bcb-side { position: relative; min-width: 0; overflow-y: auto; }
.bcb .bcb-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
              background: var(--bcb-field); color: var(--bcb-mid); cursor: pointer; display: flex; align-items: center; justify-content: center;
              transition: background-color .2s, color .2s, transform .3s var(--bcb-ease); }
.bcb .bcb-x:hover { background: var(--bcb-line); color: var(--bcb-ink); transform: rotate(90deg); }
.bcb .bcb-x svg { width: 18px; height: 18px; }
.bcb-main { padding: 26px 28px 24px; }
.bcb-main h2 { position: relative; margin: 0 36px 8px 0; padding-top: 14px; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; color: var(--bcb-navy); }
.bcb-main h2::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 3px; border-radius: 2px; background: var(--bcb-y); }
/* pływająca ikona nad koszykiem Modern Cart, ten sam rozmiar co koszyk (60px, telefon 48px) */
.bcb-launch { --bcb-navy: #003450; --bcb-y: #eab308; position: fixed; right: 35px; bottom: 92px; z-index: 9998; width: 60px; height: 60px;
              display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%;
              background: var(--bcb-y); box-shadow: 0 0 0 2px #fff, 0 6px 18px rgba(0, 20, 40, .3); cursor: pointer;
              transition: transform .2s ease-out; animation: bcb-launch-in .4s ease-out; }
.bcb-launch:hover { transform: scale(1.06); }
.bcb-launch:focus-visible { outline: 3px solid var(--bcb-navy); outline-offset: 3px; }
.bcb-launch .bcb-ring { width: 60px; height: 60px; }
.bcb-launch .bcb-ring svg { width: 24px; height: 24px; }
html.bcb-lock .bcb-launch { visibility: hidden; }
@keyframes bcb-launch-in { from { opacity: 0; transform: scale(.6); } }
@media (max-width: 767px) {
    .bcb-launch, .bcb-launch .bcb-ring { width: 48px; height: 48px; }
    .bcb-launch { bottom: 80px; }
    .bcb-launch .bcb-ring svg { width: 20px; height: 20px; }
}

/* tytuł z dzwoniącym telefonem: krótkie „dzwonienie” co ~2,4 s + rozchodzące się fale */
.bcb-main h2.bcb-h { display: flex; align-items: center; gap: 11px; padding-top: 0; }
.bcb-main h2.bcb-h::before { display: none; }
.bcb-ring { position: relative; display: inline-flex; flex: none; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center;
            background: var(--bcb-y); color: var(--bcb-navy); }
.bcb-ring svg { width: 16px; height: 16px; animation: bcb-ringing 2.4s ease-in-out infinite; transform-origin: 50% 60%; }
.bcb-ring::before, .bcb-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--bcb-y);
                                      opacity: 0; animation: bcb-wave 2.4s ease-out infinite; }
.bcb-ring::after { animation-delay: .35s; }
@keyframes bcb-ringing {
    0%, 40%, 100% { transform: rotate(0); }
    4%, 12%, 20%, 28% { transform: rotate(-16deg); }
    8%, 16%, 24%, 32% { transform: rotate(16deg); }
}
@keyframes bcb-wave {
    0% { opacity: .7; transform: scale(1); }
    45%, 100% { opacity: 0; transform: scale(1.7); }
}
.bcb-lead { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--bcb-mid); }

.bcb-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }

/* przełącznik tematu z przesuwanym podświetleniem */
.bcb-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--bcb-line); border-radius: 8px;
           background: #f7f9fb; isolation: isolate; }
.bcb-seg::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 6px;
                   background: #fff; box-shadow: 0 1px 3px rgba(0, 30, 50, .12), 0 0 0 1px rgba(0, 30, 50, .05); transition: transform .3s var(--bcb-ease); }
.bcb-seg:has(input[value="gas"]:checked)::before { transform: translateX(100%); }
.bcb-seg label { position: relative; margin: 0; cursor: pointer; }
.bcb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bcb-seg span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; border-radius: 6px;
                font-size: 12.5px; font-weight: 500; color: var(--bcb-mute); transition: color .2s; }
.bcb-seg span svg { width: 13px; height: 13px; }
.bcb-seg input:checked + span { color: var(--bcb-navy); font-weight: 600; }
.bcb-seg label:hover input:not(:checked) + span { color: var(--bcb-ink); }
.bcb-seg input:focus-visible + span { outline: 2px solid var(--bcb-navy); outline-offset: -2px; }

/* pola z ikoną */
.bcb-f { display: flex; flex-direction: column; gap: 5px; margin: 0; font-size: 12px; font-weight: 600; color: var(--bcb-mid); }
.bcb-f em { font-style: normal; font-weight: 400; color: var(--bcb-mute); }
.bcb-in { position: relative; display: block; font-style: normal; }
.bcb-in svg { position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; color: var(--bcb-mute); pointer-events: none; transition: color .2s; }
.bcb .bcb-f input, .bcb .bcb-f select { width: 100%; height: 38px; margin: 0; padding: 0 12px; border: 1.5px solid transparent; border-radius: 6px;
                                        background: var(--bcb-field); font: inherit; font-size: 14px; font-weight: 500; color: var(--bcb-ink); box-shadow: none;
                                        transition: background-color .2s, border-color .2s, box-shadow .2s; }
/* motyw ma globalne `input { border-color: #eee !important }` — w okienku ramki ustawiamy sami */
.bcb .bcb-f input, .bcb .bcb-f select { border-color: transparent !important; }
.bcb .bcb-in input { padding-left: 35px; letter-spacing: .02em; }
.bcb .bcb-f input::placeholder { color: #a3aeb9; font-weight: 400; }
.bcb .bcb-f input:hover { background: #ebf0f4; }
.bcb .bcb-f input:focus, .bcb .bcb-f select:focus { outline: none; background: #fff; border-color: var(--bcb-navy) !important; box-shadow: 0 0 0 3px rgba(0, 52, 80, .1); }
.bcb-in:focus-within svg { color: var(--bcb-navy); }
.bcb .bcb-never { display: block; margin: 12px auto 0; padding: 2px 4px; border: 0; background: none; color: var(--bcb-mute);
                  font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bcb .bcb-never:hover { color: var(--bcb-ink); }
.bcb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* wynik sprawdzenia kodu: znaczek z prawej w linii opisu pola */
.bcb-lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; }
.bcb-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; color: #fff;
             animation: bcb-pop .3s var(--bcb-ease); }
.bcb-badge svg { width: 12px; height: 12px; }
.bcb-badge.is-ok { background: #16a34a; }
.bcb-badge.is-off { background: #dc2626; }
.bcb-badge.is-checking { border: 2px solid var(--bcb-line); border-top-color: var(--bcb-navy); background: none; animation: bcb-spin .7s linear infinite; }
.bcb-in:has(input[name="postal"]) input { transition: border-color .2s, background-color .2s; }
.bcb-f:has(.bcb-badge.is-ok) input[name="postal"] { border-color: #16a34a !important; }
.bcb-f:has(.bcb-badge.is-off) input[name="postal"] { border-color: #dc2626 !important; }
@keyframes bcb-spin { to { transform: rotate(360deg); } }

.bcb-note, .bcb-err { margin: 0; padding: 8px 11px; border-radius: 6px; font-size: 12.5px; line-height: 1.5; }
.bcb-main > .bcb-note { margin: -4px 0 14px; }
.bcb-note { background: #fff6e0; color: #6b4e00; }
.bcb-err { background: #fdecec; color: #b42318; font-weight: 500; }

.bcb-consent { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 11px; line-height: 1.5; font-weight: 400; color: var(--bcb-mute); cursor: pointer; }
.bcb .bcb-consent input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--bcb-navy); cursor: pointer; }
.bcb-consent a { color: var(--bcb-navy); text-decoration: underline; text-underline-offset: 2px; }

/* przycisk: żółty, z granatowym kółkiem słuchawki */
.bcb .bcb-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 42px; margin-top: 2px; padding: 0 18px 0 6px;
                border: 0; border-radius: 8px; background: var(--bcb-y); color: var(--bcb-navy); cursor: pointer;
                box-shadow: 0 8px 18px -10px rgba(180, 130, 0, .7);
                transition: background-color .2s, transform .2s var(--bcb-ease), box-shadow .2s; }
.bcb .bcb-btn b { font-size: 14.5px; font-weight: 700; }
.bcb-btn-ic { position: absolute; left: 5px; top: 5px; width: 32px; height: 32px; border-radius: 6px; background: var(--bcb-navy); color: var(--bcb-y);
              display: flex; align-items: center; justify-content: center; }
.bcb-btn-ic svg { width: 16px; height: 16px; }
.bcb .bcb-btn:hover:not(:disabled) { background: var(--bcb-y-2); transform: translateY(-1px); box-shadow: 0 12px 22px -12px rgba(180, 130, 0, .8); }
.bcb .bcb-btn:hover:not(:disabled) .bcb-btn-ic svg { animation: bcb-ring .6s ease-in-out; }
.bcb .bcb-btn:active:not(:disabled) { transform: scale(.985); }
.bcb .bcb-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
/* przycisk „żyje”: pulsująca poświata + dzwoniąca słuchawka (na przemian z telefonem w tytule) */
.bcb .bcb-btn:not(:disabled) { animation: bcb-btn-pulse 2.4s ease-out 1.2s infinite; }
.bcb .bcb-btn:not(:disabled) .bcb-btn-ic svg { animation: bcb-ringing 2.4s ease-in-out 1.2s infinite; transform-origin: 50% 60%; }
.bcb .bcb-btn:hover:not(:disabled) { animation: none; }
@keyframes bcb-btn-pulse {
    0% { box-shadow: 0 8px 18px -10px rgba(180, 130, 0, .7), 0 0 0 0 rgba(234, 179, 8, .55); }
    50%, 100% { box-shadow: 0 8px 18px -10px rgba(180, 130, 0, .7), 0 0 0 10px rgba(234, 179, 8, 0); }
}
.bcb .bcb-btn.is-off { opacity: 1; background: #fdecec; color: #b42318; }
.bcb .bcb-btn.is-off .bcb-btn-ic { background: #dc2626; color: #fff; }
.bcb .bcb-btn:focus-visible { outline: 3px solid var(--bcb-navy); outline-offset: 3px; }
@keyframes bcb-ring { 20%, 60% { transform: rotate(-14deg); } 40%, 80% { transform: rotate(14deg); } }

/* podziękowanie */
.bcb-thanks { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
              padding: 10px 0 18px; text-align: center; }
.bcb-main:has(.bcb-thanks) { display: flex; flex-direction: column; }
.bcb-main:has(.bcb-thanks) .bcb-thanks { flex: 1; }
.bcb-ok { display: inline-flex; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 50%; align-items: center; justify-content: center;
          background: #16a34a; color: #fff; box-shadow: 0 0 0 8px rgba(22, 163, 74, .12); animation: bcb-pop .5s var(--bcb-ease); }
.bcb-ok svg { width: 28px; height: 28px; }
.bcb-main .bcb-thanks h2 { margin: 0 0 6px; padding: 0; font-size: 22px; }
.bcb-main .bcb-thanks h2::before { display: none; }
.bcb-thanks .bcb-lead { max-width: 300px; margin: 0 0 14px; }
.bcb-phone { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 14px; border-radius: 6px; background: var(--bcb-field);
             font-size: 15px; font-weight: 700; letter-spacing: .02em; color: var(--bcb-navy); }
.bcb-phone svg { width: 15px; height: 15px; color: var(--bcb-y); }
.bcb-thanks .bcb-note { margin: 0 0 6px; }
.bcb-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--bcb-y); transform-origin: left center;
             animation: bcb-timer linear forwards; }
@keyframes bcb-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes bcb-pop { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }

/* inne układy karty */
.bcb.is-top { grid-template-columns: 440px; grid-template-rows: 200px minmax(0, 1fr); }
.bcb.is-noimg { grid-template-columns: 440px; }
.bcb.is-html { grid-template-columns: minmax(0, 640px); }
.bcb.is-top .bcb-photo::before { background-position: center 25%; }
.bcb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* treść okienek promo / kupon / HTML */
.bcb-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.bcb-actions:empty { display: none; }
.bcb a.bcb-btn, .bcb a.bcb-btn:hover, .bcb a.bcb-btn:focus { text-decoration: none; color: var(--bcb-navy); }
.bcb .bcb-btn:not(:has(.bcb-btn-ic)) { padding: 0 18px; }
.bcb .bcb-link { align-self: center; font-size: 13px; font-weight: 600; color: var(--bcb-navy); text-decoration: underline; text-underline-offset: 3px; }
.bcb .bcb-link:hover { color: var(--bcb-ink); }
.bcb-code { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 6px 6px 6px 12px; border: 1.5px dashed var(--bcb-y);
            border-radius: 8px; background: #fffbea; }
.bcb-code-ic { display: flex; color: var(--bcb-y); }
.bcb-code-ic svg { width: 18px; height: 18px; }
.bcb-code code { flex: 1; min-width: 0; padding: 0; background: none; font-family: inherit; font-size: 18px; font-weight: 800; letter-spacing: .08em;
                 color: var(--bcb-navy); overflow-wrap: anywhere; }
.bcb .bcb-copy { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 12px; border: 0; border-radius: 6px;
                 background: var(--bcb-navy); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color .2s; }
.bcb .bcb-copy svg { width: 14px; height: 14px; }
.bcb .bcb-copy:hover { background: var(--bcb-navy-2); }
.bcb .bcb-copy.is-done { background: #16a34a; }
.bcb-html { font-size: 14px; line-height: 1.6; color: var(--bcb-ink); }
.bcb-html img, .bcb-html iframe, .bcb-html video { display: block; max-width: 100%; height: auto; border: 0; border-radius: 6px; }
.bcb-html iframe { width: 100%; aspect-ratio: 16 / 9; }
.bcb-html > :first-child { margin-top: 0; }
.bcb-html > :last-child { margin-bottom: 0; }
.bcb.is-html .bcb-main { padding-top: 48px; }

/* tablet: węższe zdjęcie */
@media (max-width: 820px) {
    .bcb.is-left { grid-template-columns: 210px minmax(0, 400px); }
}
/* telefon: okno od dołu; zdjęcie (gdy jest) jako pasek u góry */
@media (max-width: 600px) {
    .bcb-overlay { align-items: flex-end; padding: 0; }
    .bcb, .bcb.is-left, .bcb.is-top, .bcb.is-noimg, .bcb.is-html { grid-template-columns: 1fr; width: 100%; max-height: 94vh; border-radius: 8px 8px 0 0;
           transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
    .bcb.is-left, .bcb.is-top { grid-template-rows: 100px minmax(0, 1fr); }
    .bcb-photo::before, .bcb.is-top .bcb-photo::before { background-position: center 30%; }
    .bcb-photo::after { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255, 255, 255, .8); }
    .bcb-photo figcaption { left: 14px; bottom: 12px; font-size: 11.5px; padding: 6px 10px 6px 9px; }
    .bcb.is-left .bcb-x, .bcb.is-top .bcb-x { top: -88px; background: rgba(0, 32, 50, .5); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .bcb.is-left .bcb-x:hover, .bcb.is-top .bcb-x:hover { background: rgba(0, 32, 50, .7); color: #fff; }
    .bcb-side { overflow: visible; }
    .bcb { overflow-y: auto; }
    .bcb-main { padding: 20px 18px 20px; }
    .bcb-main h2 { font-size: 19px; padding-top: 12px; }
    .bcb-main h2.bcb-h { padding-top: 0; }
    .bcb-lead { margin-bottom: 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .bcb, .bcb-backdrop, .bcb-photo::before, .bcb-seg::before { transition: none; }
    .bcb-launch, .bcb-badge, .bcb-ok, .bcb-timer, .bcb .bcb-btn, .bcb .bcb-btn .bcb-btn-ic svg, .bcb-ring svg, .bcb-ring::before, .bcb-ring::after { animation: none !important; }
}
