.cookie-bar,
.cookie-settings,
.ip-cookie-settings-float {
    --ip-primary: #dd0b35;
    --hifi-cookie-hover: #b6092b;
    font-family: HifiRoboto, sans-serif;
    color: #28282c;
}

.cookie-bar.shown {
    background: #fff;
    border: 0;
    border-top: 4px solid var(--ip-primary);
    border-radius: 0;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 420px;
    max-width: 92%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: 24px 14px 20px 22px;
    box-shadow: 12px 0 48px rgba(23, 23, 27, .18);
    box-sizing: border-box;
    color: #28282c;
    overflow: hidden;
    position: fixed;
    text-align: left;
    visibility: visible;
    transform: translateX(0);
    animation: ip-cookie-slide-left 300ms ease-out both;
    z-index: 10000;
}

@keyframes ip-cookie-slide-left {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-bar.shown { animation: none; }
}
.cookie-bar.shown .cookie-bar-container { height: 100%; max-width: none; }
.cookie-bar.shown .cookie-bar-text {
    box-sizing: border-box;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 10px;
    font-size: 13px;
    line-height: 1.55;
    scrollbar-width: thin;
}
.cookie-bar.shown .cookie-bar-text > h3 {
    padding-right: 36px;
    color: #17171b;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.3px;
    margin-bottom: 14px;
}
.cookie-bar.shown .cookie-bar-text > p { color: #62626a; font-size: 14px; line-height: 1.65; }
.cookie-bar.shown .cookie-buttons { flex-direction: column; gap: 10px; margin: 22px 0; }
.cookie-bar.shown .cookie-buttons .action {
    width: 100%;
    min-height: 44px;
    border-radius: 6px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    white-space: normal;
    box-sizing: border-box;
    text-align: center;
}
.cookie-bar.shown .cookie-buttons .cookie-allow-all {
    min-height: 54px;
    padding: 14px;
    border: 1px solid var(--ip-primary);
    background: var(--ip-primary);
    color: #fff;
    box-shadow: none;
    font-size: 15px;
    font-weight: 700;
}
.cookie-bar.shown .cookie-buttons .cookie-allow-all:hover { background: var(--hifi-cookie-hover); border-color: var(--hifi-cookie-hover); }
.cookie-bar.shown .cookie-buttons .primary {
    border: 1px solid #aaaab5;
    background: #fff;
    color: #28282c;
    box-shadow: none;
}
.cookie-bar.shown .cookie-buttons .primary:hover { background: #fff5f7; border-color: var(--ip-primary); color: var(--hifi-cookie-hover); }
.cookie-bar.shown .cookie-buttons button:focus-visible,
.cookie-bar.shown .cookie-group-toggler:focus-visible,
.cookie-bar.shown .ip-cookie-modal-close:focus-visible { outline: 2px solid var(--ip-primary); outline-offset: 3px; }
.cookie-bar.shown .cookie-group { border: 1px solid #e0e0e6; border-radius: 6px; background: #f6f6f8; padding: 16px 14px; margin: 14px 0; }
.cookie-bar.shown .cookie-group-heading .h3 { color: #28282c; font-size: 16px; font-weight: 600; }
.cookie-bar.shown .cookie-group-toggler { flex-shrink: 0; }
.cookie-bar.shown .cookie-group-description { color: #62626a; margin: 12px 0 8px; font-size: 13px; line-height: 1.6; }
.cookie-bar.shown .cookie-group-toggler-message { display: none; }
.cookie-bar.shown .cookie-list { overflow-x: auto; }
.cookie-bar.shown .cookie-list td { overflow-wrap: anywhere; }
.cookie-bar.shown .cookie-list-caption { font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cookie-bar.shown .ip-cookie-modal-close { top: -10px; right: 2px; width: 38px; height: 38px; border-radius: 6px; background: #f6f6f8; color: #28282c; }
.cookie-bar.shown .ip-cookie-modal-close:hover { background: #fff5f7; color: var(--hifi-cookie-hover); }

.cookie-bar .cookie-bar-text h3 {
    color: var(--ip-primary);
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 12px;
}

.cookie-bar .cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}

.cookie-bar .cookie-buttons .action,
.cookie-bar .cookie-bar-buttons .action {
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    padding: 10px 18px;
}

.cookie-bar .cookie-buttons .primary,
.cookie-bar .cookie-allow-all,
.cookie-bar [data-cookies-allow-all] {
    background: var(--ip-primary);
    border: 1px solid var(--ip-primary);
    color: #fff;
}

.cookie-bar .cookie-group {
    border-top: 1px solid #e0e0e6;
    padding: 14px 0;
}

.cookie-bar .cookie-group-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.cookie-bar .cookie-group-heading .h3 {
    color: var(--ip-primary);
    font-size: 17px;
    font-weight: 800;
}

.cookie-bar .cookie-group-toggler {
    background: #aaaab5;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    height: 26px;
    padding: 3px;
    width: 48px;
}

.cookie-bar .cookie-group-toggler span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 20px;
    transition: transform .18s ease;
    width: 20px;
}

.cookie-bar .cookie-group-toggler.active {
    background: var(--ip-primary);
}

.cookie-bar .cookie-group-toggler.active span {
    transform: translateX(22px);
}

.cookie-wall {
    display: none;
}

.cookie-wall.cookie-wall--active {
    background: rgba(0, 0, 0, .35);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 9999;
}


.cookie-bar .cookie-list-toggler {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.cookie-bar .cookie-list-caption {
    color: var(--ip-primary);
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    margin: 8px 0;
}

.cookie-bar .cookie-list-caption.hide,
.cookie-bar .cookie-list .table {
    display: none;
}

.cookie-bar .cookie-list-toggler:checked ~ .cookie-list-caption.show {
    display: none;
}

.cookie-bar .cookie-list-toggler:checked ~ .cookie-list-caption.hide {
    display: inline-block;
}

.cookie-bar .cookie-list-toggler:checked ~ .table {
    display: table;
}

.cookie-bar .cookie-list .table {
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
    width: 100%;
}

.cookie-bar .cookie-list .table th,
.cookie-bar .cookie-list .table td {
    border-top: 1px solid #e0e0e6;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.ip-cookie-settings-float {
    box-sizing: border-box;
    align-items: center;
    background: var(--ip-primary);
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 999px;
    bottom: 18px;
    box-shadow: 0 4px 16px rgba(23, 23, 27, .18);
    color: #fff;
    display: inline-flex;
    justify-content: center;
    left: 18px;
    height: 44px;
    width: 44px;
    padding: 10px;
    position: fixed;
    text-decoration: none;
    z-index: 9998;
}

.ip-cookie-settings-float:hover,
.ip-cookie-settings-float:focus {
    background: var(--hifi-cookie-hover);
    color: #fff;
    text-decoration: none;
}

.ip-cookie-settings-float:focus-visible {
    outline: 2px solid var(--ip-primary);
    outline-offset: 3px;
}

.ip-cookie-settings-float svg {
    pointer-events: none;
    fill: currentColor;
    height: 22px;
    width: 22px;
}

@media (max-width: 768px) {
    .ip-cookie-settings-float {
        bottom: 12px;
        left: 12px;
    }
}

.cookie-settings .cookie-list-toggler {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.cookie-settings .cookie-list-caption {
    color: var(--ip-primary);
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    margin: 8px 0;
}

.cookie-settings .cookie-list-caption.hide,
.cookie-settings .cookie-list .table {
    display: none;
}

.cookie-settings .cookie-list-toggler:checked ~ .cookie-list-caption.show {
    display: none;
}

.cookie-settings .cookie-list-toggler:checked ~ .cookie-list-caption.hide {
    display: inline-block;
}

.cookie-settings .cookie-list-toggler:checked ~ .table {
    display: table;
}

.cookie-settings .cookie-list .table {
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
    width: 100%;
}

.cookie-settings .cookie-list .table th,
.cookie-settings .cookie-list .table td {
    border-top: 1px solid #e0e0e6;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.cookie-settings .cookie-group {
    border-top: 1px solid #e0e0e6;
    padding: 14px 0;
}

.cookie-settings .cookie-group-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.cookie-settings .cookie-group-heading .h3 {
    color: var(--ip-primary);
    font-size: 17px;
    font-weight: 800;
}

.ip-cookie-consent-message {
    background: #e9f7ef;
    border: 1px solid #92d2ad;
    border-radius: 10px;
    color: #17643a;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 10px 12px;
}

.cookie-settings .cookie-buttons .action.primary.accept-cookie-consent {
    display: inline-block !important;
}

.cookie-bar .cookie-bar-container {
    position: relative;
}

.ip-cookie-modal-close {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--ip-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    height: 42px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 42px;
    z-index: 2;
}

.ip-cookie-modal-close:hover,
.ip-cookie-modal-close:focus-visible {
    color: var(--ip-primary);
}

/* Save confirmation stays on the page after the consent drawer closes. */
.ip-cookie-consent-message.ip-cookie-consent-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: max-content;
    max-width: min(480px, calc(100% - 32px));
    margin: 0;
    padding: 14px 18px;
    border: 1px solid #92ccb0;
    border-radius: 12px;
    background: #effaf4;
    box-shadow: 0 8px 28px rgba(15, 62, 43, .16);
    color: #145334;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.ip-cookie-consent-message.ip-cookie-consent-toast::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    background: #187644;
    color: white;
}
.ip-cookie-consent-message[hidden] { display: none !important; }
@media (max-width: 767px) {
    .ip-cookie-consent-message.ip-cookie-consent-toast { bottom: 76px; }
}
