/* Baner cookies i okno ustawień – w stylu sklepu: biała karta, Gilroy, przyciski-pigułki */
.cc-banner,
.cc-modal {
    --cc-text: #1e1e1e;
    --cc-muted: #6b6b6b;
    --cc-line: #ececec;
    --cc-soft: #f5f4f2;
    --cc-accent: #CD0000;
    font-family: 'Gilroy', sans-serif;
    color: var(--cc-text);
}

/* Motyw strony ustawia własne odstępy liter i interlinię – w banerze i oknie ich nie chcemy */
.cc-banner *,
.cc-modal * {
    letter-spacing: normal;
}

/* ---------- Baner: niewielka karta w prawym dolnym rogu ---------- */
.cc-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100000;
    width: min(440px, calc(100vw - 40px));
    border: 1px solid var(--cc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
    font-size: 13px;
    line-height: 1.5;
    animation: cc-in .25s ease-out;
}

.cc-banner[hidden] {
    display: none;
}

@keyframes cc-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.cc-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
}

.cc-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cc-icon {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--cc-accent);
}

.cc-text {
    margin: 0;
    color: var(--cc-muted);
    font-size: 13px;
    line-height: 1.55;
}

.cc-text a,
.cc-modal-text a {
    color: var(--cc-text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(30, 30, 30, .35);
    text-underline-offset: 3px;
}

.cc-text a:hover,
.cc-modal-text a:hover {
    color: var(--cc-accent);
    text-decoration-color: currentColor;
}

.cc-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* "Ustawienia" jako link po lewej, decyzje po prawej */
.cc-buttons .cc-btn-link {
    margin-right: auto;
}

/* ---------- Przyciski ---------- */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: 'Gilroy', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.cc-btn[hidden] {
    display: none;
}

.cc-btn:focus-visible,
.cc-modal-close:focus-visible {
    outline: 2px solid var(--cc-accent);
    outline-offset: 2px;
}

.cc-btn-outline {
    border-color: #e2e2e2;
    background: #fff;
    color: var(--cc-text);
}

.cc-btn-outline:hover {
    border-color: var(--cc-text);
}

.cc-btn-solid {
    background: var(--cc-text);
    color: #fff;
}

.cc-btn-solid:hover {
    background: var(--cc-accent);
}

.cc-btn-link {
    height: auto;
    padding: 4px 2px;
    background: transparent;
    color: var(--cc-muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-btn-link:hover {
    color: var(--cc-accent);
}

/* ---------- Okno ustawień ---------- */
.cc-modal {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 24px;
    border: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    font-size: 14px;
    line-height: 1.5;
}

.cc-modal::backdrop {
    background: rgba(0, 0, 0, .4);
}

.cc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cc-modal-title {
    margin: 0;
    color: var(--cc-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
}

.cc-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--cc-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cc-modal-close:hover {
    background: var(--cc-soft);
}

.cc-modal-text {
    margin: 0 0 18px;
    color: var(--cc-muted);
    font-size: 14px;
    line-height: 1.55;
}

.cc-options {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.cc-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--cc-line);
    border-radius: 12px;
    background: #fff;
    color: var(--cc-muted);
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
    transition: border-color .15s ease;
}

.cc-option:hover {
    border-color: #c8c8c8;
}

.cc-option:has(input:checked) {
    border-color: var(--cc-text);
}

.cc-option:has(input:disabled) {
    background: var(--cc-soft);
    border-color: var(--cc-line);
    cursor: default;
}

.cc-option input {
    flex: none;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--cc-text);
}

.cc-option strong {
    color: var(--cc-text);
    font-size: 14px;
    font-weight: 600;
}

.cc-option span {
    line-height: 1.45;
}

.cc-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

/* ---------- Telefon: karta na całą szerokość przy dolnej krawędzi ---------- */
@media (max-width: 600px) {
    .cc-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
    }

    .cc-inner {
        padding: 16px;
    }

    .cc-buttons .cc-btn-outline,
    .cc-buttons .cc-btn-solid {
        flex: 1 1 0;
    }

    .cc-buttons .cc-btn-link {
        flex-basis: 100%;
        margin-right: 0;
        order: 3;
    }

    .cc-modal {
        padding: 20px 18px;
    }

    .cc-modal-buttons .cc-btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner {
        animation: none;
    }
}
