:root {
    --rcc-blue: #046bd2;
    --rcc-blue-strong: #0359ae;
    --rcc-slate-900: #1e293b;
    --rcc-slate-700: #334155;
    --rcc-slate-600: #475569;
    --rcc-bg: #ffffff;
    --rcc-bg-soft: #f0f5fa;
    --rcc-border: #d7e3f0;
    --rcc-focus: #93c5fd;
}

body.rcc-has-banner {
    padding-bottom: var(--rcc-banner-offset, 0px) !important;
    transition: padding-bottom 220ms ease;
}

.rcc-root,
.rcc-floating-btn,
.rcc-toast {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.rcc-root {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999998;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 240ms ease, transform 240ms ease;
}

.rcc-root.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.rcc-banner {
    background: var(--rcc-bg);
    color: var(--rcc-slate-900);
    border: 1px solid var(--rcc-border);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    padding: 16px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.14);
}

.rcc-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: var(--rcc-slate-900);
}

.rcc-description {
    margin: 0;
    color: var(--rcc-slate-700);
    font-size: 14px;
    line-height: 1.55;
}

.rcc-description a {
    color: var(--rcc-blue);
    font-weight: 600;
    text-decoration: underline;
}

.rcc-banner__actions,
.rcc-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.rcc-banner__primary-actions,
.rcc-modal__primary-actions {
    display: contents;
}

.rcc-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    min-height: 42px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
    box-shadow: none;
}

.rcc-btn:hover {
    transform: translateY(-1px);
}

.rcc-btn-main {
    flex: 1 1 150px;
}

.rcc-btn-accept,
.rcc-btn-reject,
.rcc-btn-tertiary {
    background: var(--rcc-blue);
    border-color: var(--rcc-blue);
    color: #fff;
    flex: 1 1 0;
    min-width: 120px;
}

.rcc-btn-accept:hover,
.rcc-btn-accept:focus-visible,
.rcc-btn-reject:hover,
.rcc-btn-reject:focus-visible,
.rcc-btn-tertiary:hover,
.rcc-btn-tertiary:focus-visible {
    background: var(--rcc-blue-strong);
    border-color: var(--rcc-blue-strong);
    color: #fff;
    text-decoration: none;
}

.rcc-root[data-position="modal"] {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    pointer-events: none;
}

.rcc-root[data-position="modal"] .rcc-banner {
    max-width: 680px;
    width: 100%;
    pointer-events: auto;
}

.rcc-root[data-position="bottom"] .rcc-banner {
    max-width: 1100px;
    margin: 0 auto;
    grid-template-columns: 1fr auto;
    align-items: center;
}

.rcc-root[data-position="bottom"] .rcc-banner__actions {
    min-width: 260px;
    justify-items: end;
}

.rcc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.rcc-modal.is-open {
    display: block;
}

.rcc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.rcc-modal__panel {
    position: relative;
    margin: 5vh auto;
    max-width: 720px;
    width: calc(100% - 32px);
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--rcc-border);
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    animation: rcc-fade-up 220ms ease;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.3);
}

@keyframes rcc-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rcc-modal__close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: 0;
    background: transparent;
    color: var(--rcc-slate-700);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.rcc-categories {
    margin: 16px 0;
    border-top: 1px solid var(--rcc-border);
    border-bottom: 1px solid var(--rcc-border);
}

.rcc-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf3f9;
}

.rcc-category:last-child {
    border-bottom: 0;
}

.rcc-category__text p {
    margin: 4px 0 0;
    color: var(--rcc-slate-700);
    font-size: 13px;
}

.rcc-cookie-table {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 0 0 14px;
    background: #f8fbff;
}

.rcc-cookie-table > summary {
    cursor: pointer;
    color: var(--rcc-slate-900);
    font-weight: 600;
    list-style: none;
}

.rcc-cookie-table > summary::-webkit-details-marker {
    display: none;
}

.rcc-cookie-table > summary::before {
    content: "▸";
    margin-right: 6px;
    transition: transform 160ms ease;
    display: inline-block;
}

.rcc-cookie-table[open] > summary::before {
    transform: rotate(90deg);
}

.rcc-cookie-table__inner {
    margin-top: 10px;
    overflow-x: auto;
}

.rcc-cookie-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rcc-cookie-table th,
.rcc-cookie-table td {
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 4px;
    color: var(--rcc-slate-600);
    vertical-align: top;
}

.rcc-cookie-table code {
    color: var(--rcc-slate-900);
    word-break: break-word;
}

.rcc-switch {
    position: relative;
    display: inline-flex;
    width: 50px;
    height: 28px;
}

.rcc-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rcc-switch__slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.rcc-switch__slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 180ms ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.rcc-switch input:checked + .rcc-switch__slider {
    background: var(--rcc-blue);
    box-shadow: 0 0 0 2px rgba(4, 107, 210, 0.18);
}

.rcc-switch input:checked + .rcc-switch__slider::before {
    transform: translateX(22px);
}

.rcc-switch input:disabled + .rcc-switch__slider {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.rcc-iframe-placeholder {
    border: 1px dashed #9db9d7;
    background: #f8fbff;
    color: var(--rcc-slate-900);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    max-width: 100%;
    min-height: 220px;
}

.rcc-iframe-placeholder__text {
    margin: 0;
    color: var(--rcc-slate-700);
}

.rcc-iframe-placeholder__button {
    min-width: 180px;
}

iframe.rcc-blocked-iframe[hidden] {
    display: none !important;
}

.rcc-floating-btn {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 999997;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: var(--rcc-slate-600);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 220ms ease, transform 220ms ease, color 180ms ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.rcc-floating-btn:hover {
    color: var(--rcc-blue);
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.rcc-floating-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.rcc-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000000;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    padding: 10px 14px;
    border-radius: 999px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.rcc-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.rcc-btn:focus-visible,
.rcc-modal__close:focus-visible,
.rcc-floating-btn:focus-visible,
.rcc-cookie-table > summary:focus-visible,
.rcc-switch input:focus-visible + .rcc-switch__slider {
    outline: 3px solid var(--rcc-focus);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .rcc-root {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .rcc-root[data-position="bottom"] .rcc-banner {
        grid-template-columns: 1fr;
    }

    .rcc-root[data-position="bottom"] .rcc-banner__actions {
        min-width: 0;
        justify-items: stretch;
    }

    .rcc-banner__actions,
    .rcc-modal__actions {
        gap: 8px;
    }

    .rcc-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .rcc-banner__actions,
    .rcc-modal__actions {
        flex-direction: column;
    }

    .rcc-btn-accept,
    .rcc-btn-reject,
    .rcc-btn-tertiary,
    .rcc-iframe-placeholder__button {
        width: 100%;
    }
}
