/* Cookie-баннер. Собственная типографика и цвета: баннер должен читаться
   на любой теме, включая тёмные, поэтому не наследует ни фон, ни цвет текста.
   Ширина ограничена — это уведомление, а не полоса во весь экран. */

.pcs-cookie {
    position: fixed;
    z-index: 99999;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.pcs-cookie--corner {
    justify-content: flex-start;
}

.pcs-cookie[hidden] {
    display: none;
}

.pcs-cookie__box {
    pointer-events: auto;
    width: 100%;
    max-width: 760px;
    background: #fff;
    color: #1d2327;
    border: 1px solid #e0e2e6;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    padding: 20px 22px;
    font-size: 14px;
    line-height: 1.55;
    animation: pcs-cookie-in .28s ease both;
}

.pcs-cookie--corner .pcs-cookie__box {
    max-width: 420px;
}

@keyframes pcs-cookie-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.pcs-cookie__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

.pcs-cookie__message {
    margin: 0;
    color: #50575e;
}

.pcs-cookie__message a {
    color: #2271b1;
    text-decoration: underline;
}

.pcs-cookie__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.pcs-cookie__btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #c3c7cb;
    border-radius: 8px;
    background: #fff;
    color: #1d2327;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.pcs-cookie__btn:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
}

.pcs-cookie__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, .3);
}

.pcs-cookie__btn--primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.pcs-cookie__btn--primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.pcs-cookie__btn--link {
    border-color: transparent;
    background: transparent;
    color: #2271b1;
    text-decoration: underline;
    padding-left: 6px;
    padding-right: 6px;
}

.pcs-cookie__btn--link:hover {
    background: transparent;
    border-color: transparent;
    color: #135e96;
}

/* Настройки категорий */

.pcs-cookie__prefs {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e0e2e6;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 45vh;
    overflow-y: auto;
}

.pcs-cookie__prefs[hidden] {
    display: none;
}

.pcs-cookie__cat-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.pcs-cookie__cat-head input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.pcs-cookie__cat-lock {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #646970;
    background: #f0f0f1;
    border-radius: 4px;
    padding: 2px 6px;
}

.pcs-cookie__cat-hint {
    margin: 4px 0 0 24px;
    font-size: 13px;
    color: #646970;
}

.pcs-cookie__prefs .pcs-cookie__btn {
    align-self: flex-start;
}

/* Кнопка «Настройки cookie» (шорткод) — выглядит как ссылка темы */

.pcs-cookie-open {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 600px) {
    .pcs-cookie {
        padding: 10px;
    }

    .pcs-cookie__box {
        padding: 16px;
    }

    .pcs-cookie__actions .pcs-cookie__btn {
        flex: 1 1 100%;
    }
}

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