.bbcc {
    --bbcc-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--bbcc-text);
}

.bbcc [hidden] {
    display: none !important;
}

.bbcc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    background: var(--bbcc-bg);
    color: var(--bbcc-text);
    border-radius: var(--bbcc-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.bbcc-banner__text {
    flex: 1 1 420px;
}

.bbcc-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--bbcc-text);
}

.bbcc-message {
    margin: 0;
    color: var(--bbcc-text);
}

#bbcc .bbcc-link,
#bbcc .bbcc-message a,
#bbcc .bbcc-cat__desc a,
#bbcc .bbcc-cookies summary {
    color: var(--bbcc-link);
    text-decoration: underline;
    text-decoration-color: var(--bbcc-primary-bg);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

#bbcc .bbcc-link:hover,
#bbcc .bbcc-message a:hover,
#bbcc .bbcc-cat__desc a:hover,
#bbcc .bbcc-cookies summary:hover {
    text-decoration: none;
}

.bbcc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* #bbcc w selektorach przycisków: motywy (np. Hello Elementor reset.css) stylują button/[type=button] z tą samą lub wyższą specyficznością. */
#bbcc .bbcc-btn {
    min-height: 44px;
    margin: 0;
    padding: 10px 20px;
    border: 2px solid var(--bbcc-primary-bg);
    border-radius: var(--bbcc-radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    cursor: pointer;
}

#bbcc .bbcc-btn--primary,
#bbcc .bbcc-btn--primary:hover,
#bbcc .bbcc-btn--primary:focus {
    background: var(--bbcc-primary-bg);
    color: var(--bbcc-primary-text);
}

#bbcc .bbcc-btn--secondary,
#bbcc .bbcc-btn--secondary:hover,
#bbcc .bbcc-btn--secondary:focus {
    background: var(--bbcc-secondary-bg);
    color: var(--bbcc-secondary-text);
}

#bbcc .bbcc-btn:hover {
    opacity: .88;
}

.bbcc button:focus-visible,
.bbcc a:focus-visible,
.bbcc summary:focus-visible,
.bbcc input:focus-visible + .bbcc-switch__track {
    outline: 3px solid var(--bbcc-link);
    outline-offset: 2px;
}

.bbcc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .5);
}

.bbcc-modal__box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    background: var(--bbcc-bg);
    color: var(--bbcc-text);
    border-radius: var(--bbcc-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
}

.bbcc-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(127, 127, 127, .25);
}

.bbcc-modal__head .bbcc-title {
    margin: 0;
}

#bbcc .bbcc-close,
#bbcc .bbcc-close:hover,
#bbcc .bbcc-close:focus {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--bbcc-radius);
    background: transparent;
    box-shadow: none;
    color: var(--bbcc-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.bbcc-modal__body {
    overflow-y: auto;
    padding: 18px 24px;
}

.bbcc-modal__foot {
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid rgba(127, 127, 127, .25);
}

.bbcc-cat {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(127, 127, 127, .2);
}

.bbcc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bbcc-cat__name {
    font-weight: 700;
    cursor: pointer;
}

.bbcc-cat__desc {
    margin: 6px 0 0;
    font-size: 14px;
}

.bbcc-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
}

.bbcc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.bbcc-switch input:disabled {
    cursor: not-allowed;
}

.bbcc-switch__track {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: #9aa0a6;
    transition: background .15s;
}

.bbcc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s;
}

.bbcc-switch input:checked + .bbcc-switch__track {
    background: var(--bbcc-toggle);
}

.bbcc-switch input:checked + .bbcc-switch__track::after {
    transform: translateX(20px);
}

.bbcc-switch input:disabled + .bbcc-switch__track {
    opacity: .6;
}

.bbcc-cookies {
    margin-top: 8px;
    font-size: 13px;
}

.bbcc-cookies summary {
    cursor: pointer;
    font-weight: 600;
}

.bbcc-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
}

.bbcc-cookies table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.bbcc-cookies th,
.bbcc-cookies td {
    padding: 6px 8px;
    border: 1px solid rgba(127, 127, 127, .25);
    text-align: left;
    vertical-align: top;
    color: var(--bbcc-text);
    background: transparent;
}

.bbcc-cookies code {
    font-size: 12px;
    word-break: break-all;
    background: transparent;
    color: inherit;
}

#bbcc .bbcc-float,
#bbcc .bbcc-float:hover,
#bbcc .bbcc-float:focus {
    position: fixed;
    bottom: 16px;
    z-index: 2147482999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bbcc-primary-bg);
    color: var(--bbcc-primary-text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
    cursor: pointer;
}

#bbcc.bbcc--float-left .bbcc-float {
    left: 16px;
}

#bbcc.bbcc--float-right .bbcc-float {
    right: 16px;
}

html.bbcc-lock {
    overflow: hidden;
}

@media (max-width: 640px) {
    .bbcc-banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 16px;
    }

    #bbcc .bbcc-actions .bbcc-btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbcc-switch__track,
    .bbcc-switch__track::after {
        transition: none;
    }
}
