/* Cookie consent banner (_CookieConsentBannerPartial). Self-contained: loaded on the public site,
   auth pages and user panel, which use different stylesheets. Red + white brand mix. */
.ajb-cc {
    --ajb-cc-red: #C91D13;
    --ajb-cc-red-hover: #B90A00;
    --ajb-cc-red-deep: #8F0D06;
    --ajb-cc-red-tint: #FFF4F3;
    --ajb-cc-red-line: #F6D2CF;
    --ajb-cc-navy: #0E243A;
    --ajb-cc-text: #4A5866;
    --ajb-cc-white: #FFFFFF;
    --ajb-cc-gradient: linear-gradient(135deg, #DE2A1E 0%, #C91D13 50%, #A0120A 100%);
    font-family: inherit;
    color: var(--ajb-cc-navy);
}

.ajb-cc [hidden] {
    display: none !important;
}

.ajb-cc *,
.ajb-cc *::before,
.ajb-cc *::after {
    box-sizing: border-box;
}

/* ---------- Banner: white card, red accents ---------- */

.ajb-cc-banner {
    position: fixed;
    inset-inline: 20px;
    bottom: 20px;
    z-index: 2147483000;
    max-width: 1080px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    overflow: hidden;
    background: var(--ajb-cc-white);
    border: 1px solid var(--ajb-cc-red-line);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(201, 29, 19, 0.18), 0 4px 14px rgba(14, 36, 58, 0.08);
    animation: ajb-cc-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Red accent strip on the start edge */
.ajb-cc-banner::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 6px;
    background: var(--ajb-cc-gradient);
}

/* Faint red glow behind the icon */
.ajb-cc-banner::after {
    content: "";
    position: absolute;
    inset-inline-start: -90px;
    top: -110px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 29, 19, 0.09) 0%, rgba(201, 29, 19, 0) 70%);
    pointer-events: none;
}

.ajb-cc-banner > * {
    position: relative;
    z-index: 1;
}

.ajb-cc-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--ajb-cc-gradient);
    box-shadow: 0 10px 22px rgba(201, 29, 19, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: var(--ajb-cc-white);
}

.ajb-cc-chip {
    fill: var(--ajb-cc-red);
}

.ajb-cc-banner-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ajb-cc-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--ajb-cc-red);
}

.ajb-cc-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ajb-cc-text);
}

.ajb-cc-link {
    font-weight: 700;
    color: var(--ajb-cc-red) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* ---------- Buttons ---------- */

.ajb-cc-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ajb-cc-btn {
    min-height: 46px;
    padding: 11px 22px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

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

.ajb-cc-btn:active {
    transform: translateY(0);
}

.ajb-cc-btn-solid {
    background: var(--ajb-cc-gradient);
    color: var(--ajb-cc-white);
    box-shadow: 0 8px 20px rgba(201, 29, 19, 0.3);
}

.ajb-cc-btn-solid:hover {
    background: var(--ajb-cc-red-hover);
}

/* "Reject all" stays as visible as "Accept all" on purpose (equal-prominence requirement) */
.ajb-cc-btn-outline {
    background: var(--ajb-cc-white);
    border-color: var(--ajb-cc-red);
    color: var(--ajb-cc-red);
}

.ajb-cc-btn-outline:hover {
    background: var(--ajb-cc-red-tint);
}

.ajb-cc-btn-ghost {
    background: transparent;
    color: var(--ajb-cc-red);
    text-decoration: underline !important;
    text-underline-offset: 4px;
    text-decoration-color: rgba(201, 29, 19, 0.4) !important;
}

.ajb-cc-btn-ghost:hover {
    background: var(--ajb-cc-red-tint);
}

.ajb-cc-btn:focus-visible,
.ajb-cc-switch input:focus-visible + .ajb-cc-slider {
    outline: 2px solid var(--ajb-cc-red) !important;
    outline-offset: 3px;
}

/* ---------- Settings dialog: red header, white body ---------- */

.ajb-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ajb-cc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 36, 58, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: ajb-cc-fade 0.3s ease both;
}

.ajb-cc-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    background: var(--ajb-cc-white);
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(14, 36, 58, 0.35);
    animation: ajb-cc-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ajb-cc-dialog:focus {
    outline: none;
}

.ajb-cc-dialog-head {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    overflow: hidden;
    background: var(--ajb-cc-gradient);
    color: var(--ajb-cc-white);
}

/* Light blob for depth in the red header */
.ajb-cc-dialog-head::before {
    content: "";
    position: absolute;
    inset-inline-end: -60px;
    top: -110px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.ajb-cc-dialog-head > * {
    position: relative;
}

.ajb-cc-dialog-head .ajb-cc-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ajb-cc-dialog-head .ajb-cc-title {
    flex: 1 1 auto;
    margin: 0;
    color: var(--ajb-cc-white);
}

.ajb-cc-close {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: var(--ajb-cc-white);
    cursor: pointer;
}

.ajb-cc-close:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: rotate(90deg);
}

.ajb-cc-close:focus-visible {
    outline: 2px solid var(--ajb-cc-white) !important;
    outline-offset: 3px;
}

.ajb-cc-dialog-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 24px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--ajb-cc-red-line) transparent;
}

.ajb-cc-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.ajb-cc-category {
    padding: 16px 18px;
    background: var(--ajb-cc-white);
    border: 1px solid var(--ajb-cc-red-line);
    border-radius: 18px;
}

.ajb-cc-category:hover {
    background: var(--ajb-cc-red-tint);
}

.ajb-cc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

label.ajb-cc-category-head {
    cursor: pointer;
}

.ajb-cc-category-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--ajb-cc-navy);
}

.ajb-cc-always {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--ajb-cc-red);
    color: var(--ajb-cc-white);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ajb-cc-switch {
    position: relative;
    flex: 0 0 auto;
    width: 50px;
    height: 28px;
}

.ajb-cc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ajb-cc-slider {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: #D9DEE3;
    pointer-events: none;
}

.ajb-cc-slider::before {
    content: "";
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ajb-cc-white);
    box-shadow: 0 2px 6px rgba(14, 36, 58, 0.25);
}

.ajb-cc-switch input:checked + .ajb-cc-slider {
    background: var(--ajb-cc-gradient);
}

.ajb-cc-switch input:checked + .ajb-cc-slider::before {
    inset-inline-start: 26px;
}

.ajb-cc-dialog .ajb-cc-actions {
    justify-content: flex-end;
    margin-top: 22px;
}

/* ---------- Motion ---------- */

@keyframes ajb-cc-rise {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ajb-cc-pop {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ajb-cc-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ajb-cc-banner,
    .ajb-cc-dialog,
    .ajb-cc-backdrop {
        animation: none;
    }

    .ajb-cc-btn:hover,
    .ajb-cc-close:hover {
        transform: none;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 767.98px) {
    /* Icon beside the text, buttons full width underneath */
    .ajb-cc-banner {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: start;
        gap: 16px 14px;
        inset-inline: 12px;
        bottom: 12px;
        padding-block: 18px 16px;
        padding-inline: 20px 16px;
        border-radius: 22px;
    }

    .ajb-cc-banner > .ajb-cc-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .ajb-cc-banner > .ajb-cc-actions {
        grid-column: 1 / -1;
    }

    .ajb-cc-title {
        font-size: 17px;
    }

    .ajb-cc-text {
        font-size: 13.5px;
        line-height: 1.75;
    }

    .ajb-cc-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .ajb-cc-btn {
        width: 100%;
    }

    .ajb-cc-dialog {
        border-radius: 22px;
    }

    .ajb-cc-dialog-head {
        padding: 16px 18px;
    }

    .ajb-cc-dialog-body {
        padding: 18px 18px 20px;
    }
}
