/* Pasek pokazowy nad demami (demo-pasek.js). Wspólny dla wszystkich dem —
   jest „ramką" portfolio, nie częścią strony firmy, więc ma własny, neutralny
   wygląd niezależny od motywu dema.

   Wysokość 38px na każdej szerokości: dema mają .navbar { top: 38px } na sztywno. */

.bw-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 38px;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    background: #0d0d0d;
    border-bottom: 1px solid rgba(200, 169, 110, .25);
    color: #e8e2d6;
    font: 500 13px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
}
.bw-bar *, .bw-overlay *, .bw-crm *, .bw-toast * { box-sizing: border-box; }
/* :where — reset bez wagi, żeby klasy niżej (.bw-cta, .bw-arrow…) go nadpisywały */
:where(.bw-bar) a, :where(.bw-bar) button {
    color: inherit;
    font: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
}
.bw-bar a:focus-visible, .bw-bar button:focus-visible,
.bw-overlay button:focus-visible, .bw-crm a:focus-visible, .bw-crm button:focus-visible {
    outline: 2px solid #c8a96e;
    outline-offset: 2px;
}

.bw-back { color: #9a948a; white-space: nowrap; padding: 6px 4px; }
.bw-back:hover { color: #fff; }
.bw-back b { color: #c8a96e; letter-spacing: 2px; font-weight: 700; }

.bw-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bw-arrow {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 6px;
    font-size: 18px; line-height: 1;
    color: #c8a96e;
}
.bw-arrow:hover { background: rgba(255, 255, 255, .08); }
.bw-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-title strong { color: #fff; font-weight: 600; }
.bw-title span { color: #8a857c; }

.bw-actions { display: flex; align-items: center; gap: 8px; }
.bw-toggle {
    display: flex;
    padding: 2px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .06);
}
.bw-toggle button { padding: 5px 10px; border-radius: 5px; color: #9a948a; }
.bw-toggle button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.bw-link { padding: 6px 8px; color: #c8c2b6; white-space: nowrap; }
.bw-link:hover { color: #fff; }
.bw-cta {
    padding: 7px 12px;
    border-radius: 6px;
    background: #c8a96e;
    color: #0d0d0d !important;
    font-weight: 700 !important;
    white-space: nowrap;
}
.bw-cta:hover { background: #e0c48a; }

@media (max-width: 900px) {
    .bw-hide-md { display: none !important; }
}
@media (max-width: 560px) {
    .bw-hide-sm { display: none !important; }
    .bw-bar { gap: 6px; padding: 0 6px; }
    .bw-cta { padding: 6px 10px; font-size: 12px; }
}

/* Podgląd w ramce telefonu i zrzuty: bez paska, więc nawigacja dema od samej góry */
html.bw-podglad .navbar { top: 0 !important; }
html.bw-podglad .hero { margin-top: 0 !important; }

/* Zrzut do kart portfolio: wszystko, co normalnie wjeżdża przy scrollu, od razu widoczne */
html.bw-zrzut [class*="reveal"],
html.bw-zrzut [class*="fade-in"],
html.bw-zrzut [class*="animate"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ── Telefon ── */
.bw-overlay {
    position: fixed; inset: 38px 0 0;   /* pasek zostaje widoczny — „Komputer" wraca */
    z-index: 2147482999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    background: rgba(8, 8, 8, .92);
    font: 500 14px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #c8c2b6;
}
.bw-overlay[hidden] { display: none; }
/* Ekran zawsze 390×844 (typowy telefon), całość skalowana do okna przez --bw-s —
   zmniejszanie samego iframe'a dawało układ węższy niż jakikolwiek telefon */
.bw-phone-box {
    width: calc(414px * var(--bw-s, 1));
    height: calc(868px * var(--bw-s, 1));
}
.bw-phone {
    width: 414px; height: 868px;
    padding: 12px;
    border-radius: 46px;
    background: #1b1b1b;
    box-shadow: 0 0 0 2px #333, 0 30px 80px rgba(0, 0, 0, .6);
    transform: scale(var(--bw-s, 1));
    transform-origin: 0 0;
}
.bw-phone iframe {
    width: 100%; height: 100%;
    border: 0;
    border-radius: 34px;
    background: #fff;
}
.bw-overlay-close {
    position: absolute; top: 16px; right: 20px;
    width: 40px; height: 40px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff; font-size: 24px; line-height: 1;
    cursor: pointer;
}

/* ── Podgląd panelu zgłoszeń (odwzorowuje templates/client /panel) ── */
.bw-crm {
    position: fixed;
    top: 50px; right: 12px;
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100vh - 62px);
    overflow: auto;
    z-index: 2147483001;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
    font: 400 14px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    text-align: left;
}
.bw-crm[hidden] { display: none; }
.bw-crm-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}
.bw-crm-head strong { display: block; font-size: 16px; }
.bw-crm-head small { color: #64748b; }
.bw-crm-close { border: 0; background: none; font-size: 22px; color: #64748b; cursor: pointer; }
.bw-crm-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 4px; }
.bw-crm-tabs span {
    padding: 4px 10px; border-radius: 999px;
    border: 1px solid #e2e8f0; font-size: 12px; color: #475569;
}
.bw-crm-tabs span:first-child { background: #0f172a; border-color: #0f172a; color: #fff; }
.bw-crm-list { list-style: none; margin: 0; padding: 8px 18px; }
.bw-crm-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.bw-crm-row.bw-new { animation: bw-flash 2.4s ease; }
@keyframes bw-flash { 0%, 40% { background: #eff6ff; } 100% { background: transparent; } }
.bw-crm-name { font-weight: 600; }
.bw-crm-meta { grid-column: 1; color: #64748b; font-size: 12px; }
.bw-crm-msg { grid-column: 1 / -1; color: #334155; font-size: 13px; }
.bw-badge {
    grid-row: 1; grid-column: 2;
    align-self: start;
    padding: 3px 9px;
    border-radius: 7px;
    border: 1px solid;
    font-size: 12px; font-weight: 500;
    white-space: nowrap;
}
.bw-badge.nowy        { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.bw-badge.w-kontakcie { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.bw-badge.klient      { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.bw-crm-foot { padding: 12px 18px 18px; color: #475569; font-size: 13px; }
.bw-crm-foot a {
    display: inline-block; margin-top: 10px;
    padding: 9px 14px; border-radius: 8px;
    background: #0f172a; color: #fff; font-weight: 600; text-decoration: none;
}

/* ── Po wysłaniu formularza w demie ── */
.bw-toast {
    position: fixed;
    right: 16px; bottom: 16px;
    width: min(360px, calc(100vw - 32px));
    z-index: 2147483002;
    padding: 14px 16px;
    border-radius: 12px;
    background: #0d0d0d;
    border: 1px solid rgba(200, 169, 110, .35);
    color: #e8e2d6;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
    font: 400 13px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    text-align: left;
    transform: translateY(20px);
    opacity: 0;
    transition: opacity .3s, transform .3s;
}
.bw-toast.bw-show { opacity: 1; transform: none; }
.bw-toast strong { color: #fff; display: block; margin-bottom: 4px; font-size: 14px; }
.bw-toast small { display: block; margin-top: 6px; color: #8a857c; }
.bw-toast-actions { display: flex; gap: 12px; margin-top: 10px; }
.bw-toast button {
    padding: 0; border: 0; background: none;
    color: #c8a96e; font: inherit; font-weight: 600; cursor: pointer;
}
.bw-toast button + button { color: #8a857c; font-weight: 400; }

/* ── Wspólne dla treści dem: ikony, „otwarte teraz", przycisk Zadzwoń ── */
.ikona {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.bw-otwarte {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.5;
}
.bw-otwarte::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.bw-otwarte-tak { background: rgba(22, 163, 74, .14); color: #16a34a; }
.bw-otwarte-nie { background: rgba(148, 148, 148, .16); color: #8a8a8a; }

.bw-zadzwon { display: none; }
@media (max-width: 768px) {
    .bw-zadzwon {
        position: fixed;
        left: 16px; bottom: 16px;   /* po prawej dema mają „do góry" */
        z-index: 2147482990;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 18px;
        border: 0;
        border-radius: 999px;
        background: var(--bw-akcent);
        color: var(--bw-na-akcencie);
        font: 700 15px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
        cursor: pointer;
    }
    .bw-zadzwon svg {
        width: 18px; height: 18px;
        fill: none; stroke: currentColor; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round;
    }
    .bw-toast { bottom: 80px; }
}

/* Zasłona mapy Google — mapa wczytuje się dopiero po kliknięciu (demo-pasek.js). */
.bw-mapa {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; padding: 20px;
    text-align: center; background: rgba(0, 0, 0, 0.55); z-index: 2;
}
.bw-mapa-przycisk {
    font: inherit; font-weight: 600; padding: 12px 22px; border-radius: 999px; border: 0;
    cursor: pointer; background: var(--bw-akcent, #fff); color: var(--bw-na-akcencie, #111);
}
.bw-mapa-info { margin: 0; max-width: 280px; font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
