/* Restore Britain Cookie Compliance — front-end banner + policy */

.rb-cc-banner,
.rb-cc-reopen,
.rb-cc-policy {
    --rb-cc-navy: #051D3F;
    --rb-cc-navy-2: #0a2d5c;
    --rb-cc-red: #C8102E;
    --rb-cc-red-2: #a50d25;
    --rb-cc-white: #ffffff;
    --rb-cc-muted: rgba(255, 255, 255, 0.82);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
}

.rb-cc-banner {
    position: fixed;
    right: 20px;
    left: auto;
    bottom: 20px;
    z-index: 999999;
    width: min(392px, calc(100vw - 40px));
    background: var(--rb-cc-navy);
    color: var(--rb-cc-white);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(5, 29, 63, 0.38);
    overflow: hidden;
    display: none;
}
.rb-cc-banner.is-open {
    display: block;
    animation: rb-cc-in 220ms ease-out;
}

@keyframes rb-cc-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .rb-cc-banner.is-open { animation: none; }
}

.rb-cc-flag {
    height: 5px;
    background: #C8102E;
}
.rb-cc-flag span { display: none; }

.rb-cc-banner-inner {
    padding: 18px 18px 16px;
}

.rb-cc-banner-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.rb-cc-banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    line-height: 1.2;
}

.rb-cc-banner-title svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
}

.rb-cc-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    width: 36px;
    height: 36px;
    margin: -8px -8px 0 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rb-cc-close:hover,
.rb-cc-close:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.rb-cc-banner-text {
    margin: 0 0 8px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--rb-cc-muted);
}

.rb-cc-banner-text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rb-cc-banner-text a:hover {
    color: #ffd4db;
}

.rb-cc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.rb-cc-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    width: 100%;
    box-sizing: border-box;
}
.rb-cc-btn-accept {
    background: var(--rb-cc-red);
    color: #fff;
}
.rb-cc-btn-accept:hover,
.rb-cc-btn-accept:focus {
    background: var(--rb-cc-red-2);
    color: #fff;
    outline: none;
}
.rb-cc-btn-reject {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}
.rb-cc-btn-reject:hover,
.rb-cc-btn-reject:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}
.rb-cc-btn-choose {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    min-height: 40px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    grid-column: 1 / -1;
}
.rb-cc-btn-choose:hover,
.rb-cc-btn-choose:focus {
    color: #fff;
    outline: none;
}

.rb-cc-panel {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.rb-cc-panel.is-open { display: block; }
.rb-cc-panel .rb-cc-actions {
    grid-template-columns: 1fr;
}

.rb-cc-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}
.rb-cc-cat + .rb-cc-cat {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.rb-cc-cat-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.rb-cc-cat-copy span {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
}

.rb-cc-switch {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}
.rb-cc-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.rb-cc-switch input:disabled {
    cursor: not-allowed;
}
.rb-cc-switch i {
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
    transition: background 160ms ease;
}
.rb-cc-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 160ms ease;
}
.rb-cc-switch input:checked + i {
    background: var(--rb-cc-red);
}
.rb-cc-switch input:checked + i::after {
    transform: translateX(18px);
}
.rb-cc-switch input:disabled + i {
    background: #2f6b45;
}
.rb-cc-switch input:focus-visible + i {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--rb-cc-red);
}

.rb-cc-reopen {
    position: fixed;
    right: 20px;
    left: auto;
    bottom: 20px;
    z-index: 999998;
    width: 52px;
    height: 52px;
    padding: 0;
    margin: 0;
    line-height: 0;
    border-radius: 50%;
    border: 0;
    background: #C8102E;
    color: #fff;
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
    cursor: pointer;
    display: none;
    place-items: center;
}
.rb-cc-reopen.is-visible { display: grid; }
.rb-cc-reopen:hover,
.rb-cc-reopen:focus {
    background: #a50d25;
    outline: none;
}
.rb-cc-reopen svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0;
    padding: 0;
    color: #fff;
    fill: currentColor;
}

.rb-cc-policy {
    color: var(--rb-cc-navy);
    font-size: 16px;
    line-height: 1.65;
    max-width: 760px;
}
.rb-cc-policy h2 {
    color: var(--rb-cc-navy);
    font-size: 1.35rem;
    margin: 1.75rem 0 0.6rem;
    line-height: 1.25;
}
.rb-cc-policy h3 {
    color: var(--rb-cc-navy);
    font-size: 1.05rem;
    margin: 1.25rem 0 0.45rem;
}
.rb-cc-policy p,
.rb-cc-policy ul {
    margin: 0 0 0.85rem;
}
.rb-cc-policy a {
    color: var(--rb-cc-red);
}
.rb-cc-policy-updated {
    font-size: 13px;
    color: #5c6b7a;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 600;
}
.rb-cc-table-wrap {
    overflow-x: auto;
    margin: 1rem 0 1.25rem;
    border: 1px solid #e2e5ea;
    border-radius: 12px;
}
.rb-cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.45;
}
.rb-cc-table th,
.rb-cc-table td {
    text-align: left;
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 1px solid #eef1f4;
}
.rb-cc-table th {
    background: var(--rb-cc-navy);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}
.rb-cc-table tr:last-child td { border-bottom: 0; }
.rb-cc-table code {
    font-size: 12px;
    background: #f4f6f8;
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--rb-cc-navy);
}
.rb-cc-policy-btn,
.rb-cc-open-prefs {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 0;
    background: var(--rb-cc-red);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none !important;
}
.rb-cc-policy-btn:hover,
.rb-cc-open-prefs:hover {
    background: var(--rb-cc-red-2);
}

@media (max-width: 640px) {
    .rb-cc-banner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -16px 40px rgba(5, 29, 63, 0.28);
        max-height: min(88vh, 100%);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .rb-cc-banner.is-open {
        animation-name: rb-cc-up;
    }
    .rb-cc-banner-inner {
        padding: 20px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    }
    .rb-cc-actions {
        gap: 10px;
    }
    .rb-cc-btn {
        min-height: 48px;
        font-size: 15px;
    }
    .rb-cc-reopen {
        right: 16px;
        left: auto;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 52px;
        height: 52px;
    }
}

@keyframes rb-cc-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
