/* ==========================================================
   Cookie Banner v3.1 – wycennikbudowlany.pl
   Styl dopasowany do motywu wycennik-child
   Kolory: #0E3B3E (główny), #5F7775 (tekst), #B24A18 (akcent),
           #E6E5E2 (linie), #FAFAF9 / #EFF6F4 (tła)
   Fonty:  Manrope (tekst), Playfair Display (nagłówek)
   ========================================================== */

.wcb-banner {
    --wcb-primary: #0E3B3E;
    --wcb-primary-hover: #0A2C2E;
    --wcb-text: #5F7775;
    --wcb-accent: #B24A18;
    --wcb-line: #E6E5E2;
    --wcb-bg-soft: #FAFAF9;
    --wcb-bg-mint: #EFF6F4;
    --wcb-toggle-off: #C7DBD9;

    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    display: none;
    background: #ffffff;
    border-top: 1px solid var(--wcb-line);
    box-shadow: 0 -8px 30px rgba(14, 59, 62, 0.10);
    padding: 24px 24px 22px;
    font-family: Manrope, -apple-system, "system-ui", "Segoe UI", Arial, sans-serif;
    color: var(--wcb-primary);
    -webkit-font-smoothing: antialiased;
    animation: wcbSlideUp 0.35s ease-out;
    box-sizing: border-box;
}

.wcb-banner *,
.wcb-banner *::before,
.wcb-banner *::after {
    box-sizing: border-box;
}

.wcb-banner.wcb-show {
    display: block;
}

@keyframes wcbSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wcb-content {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 40px;
    align-items: end;
}

.wcb-main {
    min-width: 0;
}

.wcb-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wcb-accent);
    margin: 0 0 6px;
}

.wcb-banner h2.wcb-title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--wcb-primary);
    margin: 0 0 8px;
    padding: 0;
    letter-spacing: 0;
    text-transform: none;
}

.wcb-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--wcb-text);
    margin: 0;
    max-width: 760px;
}

.wcb-text a {
    color: var(--wcb-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--wcb-toggle-off);
    transition: text-decoration-color 0.2s;
}

.wcb-text a:hover {
    text-decoration-color: var(--wcb-primary);
}

/* ---------- Panel ustawień ---------- */
.wcb-options {
    display: none;
    grid-column: 1 / -1;
    margin-top: 6px;
    background: var(--wcb-bg-soft);
    border: 1px solid var(--wcb-line);
    border-radius: 6px;
    padding: 4px 20px;
}

.wcb-options.wcb-show {
    display: block;
}

.wcb-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--wcb-line);
}

.wcb-category:last-child {
    border-bottom: none;
}

.wcb-category h3 {
    font-family: Manrope, -apple-system, "system-ui", "Segoe UI", Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--wcb-primary);
    margin: 0 0 3px;
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
}

.wcb-category p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--wcb-text);
    margin: 0;
}

/* ---------- Przełączniki ---------- */
.wcb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin: 0;
}

.wcb-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wcb-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--wcb-toggle-off);
    border-radius: 24px;
    transition: background 0.25s;
}

.wcb-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(14, 59, 62, 0.25);
    transition: transform 0.25s;
}

.wcb-toggle input:checked + .wcb-slider {
    background: var(--wcb-primary);
}

.wcb-toggle input:checked + .wcb-slider::before {
    transform: translateX(20px);
}

.wcb-toggle input:focus-visible + .wcb-slider {
    outline: 2px solid var(--wcb-accent);
    outline-offset: 2px;
}

.wcb-toggle input:disabled + .wcb-slider {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Przyciski (jak .wyc-btn na stronie) ---------- */
.wcb-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.wcb-btn {
    font-family: Manrope, -apple-system, "system-ui", "Segoe UI", Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    padding: 12px 22px;
    border-radius: 6px;
    border: 1px solid var(--wcb-primary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    margin: 0;
}

.wcb-btn:focus-visible {
    outline: 2px solid var(--wcb-accent);
    outline-offset: 2px;
}

.wcb-btn-primary {
    background: var(--wcb-primary);
    color: #ffffff;
}

.wcb-btn-primary:hover {
    background: var(--wcb-primary-hover);
    border-color: var(--wcb-primary-hover);
    color: #ffffff;
}

.wcb-btn-secondary {
    background: transparent;
    color: var(--wcb-primary);
}

.wcb-btn-secondary:hover {
    background: var(--wcb-bg-mint);
    color: var(--wcb-primary);
}

.wcb-btn-text {
    background: transparent;
    border-color: transparent;
    color: var(--wcb-primary);
    padding-left: 8px;
    padding-right: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--wcb-toggle-off);
}

.wcb-btn-text:hover {
    background: transparent;
    color: var(--wcb-primary);
    text-decoration-color: var(--wcb-primary);
}

/* ---------- Pływający przycisk „Ustawienia cookies” ---------- */
.wcb-reopen {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147482999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #E6E5E2;
    background: #ffffff;
    color: #0E3B3E;
    box-shadow: 0 4px 14px rgba(14, 59, 62, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s;
}

.wcb-reopen:hover {
    transform: scale(1.06);
}

.wcb-reopen svg {
    width: 20px;
    height: 20px;
}

/* ---------- Responsywność ---------- */
@media (max-width: 900px) {
    .wcb-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wcb-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .wcb-banner {
        padding: 18px 16px 16px;
        max-height: 88vh;
        overflow-y: auto;
    }
    .wcb-banner h2.wcb-title {
        font-size: 19px;
    }
    .wcb-text {
        font-size: 13.5px;
    }
    .wcb-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .wcb-btn {
        width: 100%;
        text-align: center;
        padding: 13px 18px;
    }
    .wcb-options {
        padding: 2px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcb-banner { animation: none; }
}
