:root {
    --prolite-primary: #8e44ad;
    --prolite-secondary: #f06292;
    --prolite-gradient: linear-gradient(90deg, var(--prolite-primary), var(--prolite-secondary));
    --prolite-text: #253044;
    --prolite-muted: #667085;
    --prolite-border: #e3e6ec;
    --prolite-soft-bg: #f8f8fa;
    --prolite-bg: #ffffff;
}

/* Floating preferences button */
#pl-shield {
    position: fixed;
    left: 20px;
    bottom: 65px;
    z-index: 999998;
    width: 46px;
    height: 46px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    color: #fff;
    background: var(--prolite-gradient);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    -webkit-tap-highlight-color: transparent;
}

#pl-shield:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .34);
}

#pl-shield:active {
    transform: scale(.96);
}

#pl-shield:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--prolite-primary) 38%, transparent);
    outline-offset: 3px;
}

#pl-shield.pl-initial-hide {
    visibility: hidden;
    opacity: 0;
}

/* Preferences dialog */
#pl-banner {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 999999;
    display: none;
    width: min(520px, calc(100% - 40px));
    max-height: 86vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 30px;
    color: var(--prolite-text);
    background: var(--prolite-bg);
    border: 1px solid var(--prolite-border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    animation: proliteFadeIn .28s ease-out;
}

#pl-banner.pl-visible {
    display: block;
}

@keyframes proliteFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#pl-banner .pl-close {
    position: absolute;
    top: 17px;
    right: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #666;
    background: #f5f5f7;
    border: 0;
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

#pl-banner .pl-close:hover {
    color: var(--prolite-primary);
    background: #eeeef2;
    transform: rotate(4deg);
}

#pl-banner .pl-logo {
    display: block;
    width: auto;
    max-width: 170px;
    max-height: 58px;
    object-fit: contain;
    margin: 0 auto 17px;
}

#pl-banner h2 {
    margin: 0 42px 10px;
    color: var(--prolite-primary);
    text-align: center;
    font-size: 21px;
    line-height: 1.3;
}

#pl-banner > p {
    margin: 0 0 22px;
    color: #555f70;
    text-align: center;
    font-size: 14px;
    line-height: 1.65;
}

/* Categories */
.pl-category {
    margin: 0 0 10px;
    overflow: hidden;
    background: var(--prolite-soft-bg);
    border: 1px solid #ededf1;
    border-radius: 14px;
}

.pl-category summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    padding: 13px 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.pl-category summary::-webkit-details-marker {
    display: none;
}

.pl-category[open] summary {
    margin-bottom: 0;
    border-bottom: 1px solid #e9e9ed;
}

.pl-category-details {
    padding: 13px 14px 14px;
    color: var(--prolite-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.pl-category-details > p {
    margin: 0 0 11px;
}

.pl-service {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr);
    gap: 5px 10px;
    margin-top: 7px;
    padding: 11px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 9px;
}

.pl-service strong {
    color: var(--prolite-text);
}

.pl-service code {
    padding: 2px 5px;
    overflow-wrap: anywhere;
    color: #4c5668;
    background: #f2f3f6;
    border-radius: 4px;
    font-size: 12px;
}

.pl-service span,
.pl-service small {
    grid-column: 1 / -1;
}

.pl-service small {
    color: #7a8494;
}

.pl-no-services {
    margin: 5px 0 0;
    color: #8a93a2;
    font-style: italic;
}

.pl-always-active {
    flex: 0 0 auto;
    padding: 5px 9px;
    color: #1b5e20;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* Switches */
.pl-switch {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 56px;
    height: 30px;
}

.pl-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.pl-slider {
    position: absolute;
    inset: 0;
    background: #8a8f99;
    border-radius: 999px;
    cursor: pointer;
    transition: .28s ease;
}

.pl-slider::before {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    content: "";
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .24);
    transition: .28s ease;
}

.pl-switch input:checked + .pl-slider {
    background: var(--prolite-primary);
}

.pl-switch input:checked + .pl-slider::before {
    transform: translateX(26px);
}

.pl-switch input:focus-visible + .pl-slider {
    outline: 3px solid color-mix(in srgb, var(--prolite-primary) 35%, transparent);
    outline-offset: 2px;
}

.pl-slider:hover {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

/* Actions */
.pl-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.pl-button,
.prolite-manage-consent {
    min-height: 46px;
    padding: 12px 15px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}

.pl-button:hover,
.prolite-manage-consent:hover {
    transform: translateY(-1px);
}

.pl-button-primary {
    grid-column: 1 / -1;
    min-height: 52px;
    color: #fff;
    background: var(--prolite-gradient);
    border: 0;
    font-size: 16px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--prolite-primary) 24%, transparent);
}

.pl-button-primary:hover {
    opacity: .94;
}

.pl-button-secondary {
    color: var(--prolite-primary);
    background: #fff;
    border: 2px solid var(--prolite-primary);
}

.pl-button-secondary:hover {
    color: #fff;
    background: var(--prolite-primary);
}

.pl-button-outline {
    color: #3f4652;
    background: #f4f4f6;
    border: 2px solid #dedee4;
}

.pl-button-outline:hover {
    background: #e9e9ed;
}

.pl-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 19px;
    font-size: 13px;
}

.pl-links a {
    color: var(--prolite-primary);
    font-weight: 650;
    text-decoration: none;
}

.pl-links a:hover {
    text-decoration: underline;
}

/* Public cookie policy tables */
.prolite-policy-list {
    --prolite-table-border: #dfe3ea;
    color: var(--prolite-text);
}

.prolite-policy-section {
    margin: 30px 0;
}

.prolite-policy-section > h3 {
    position: relative;
    margin: 0 0 14px;
    padding-left: 14px;
    color: var(--prolite-primary);
    font-size: 22px;
    line-height: 1.35;
}

.prolite-policy-section > h3::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 5px;
    content: "";
    background: var(--prolite-primary);
    border-radius: 999px;
}

.prolite-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--prolite-table-border);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .07);
}

.prolite-cookies-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    color: #30394a;
    font-size: 15px;
    line-height: 1.55;
}

.prolite-cookies-table th {
    padding: 15px 14px;
    color: #fff;
    background: var(--prolite-primary);
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .20);
    text-align: left;
    font-size: 15px;
    font-weight: 750;
    white-space: nowrap;
}

.prolite-cookies-table th:last-child {
    border-right: 0;
}

.prolite-cookies-table td {
    padding: 15px 14px;
    vertical-align: top;
    background: #fff;
    border: 0;
    border-right: 1px solid var(--prolite-table-border);
    border-bottom: 1px solid var(--prolite-table-border);
}

.prolite-cookies-table td:last-child {
    border-right: 0;
}

.prolite-cookies-table tbody tr:last-child td {
    border-bottom: 0;
}

.prolite-cookies-table tbody tr:nth-child(even) td {
    background: #fafafe;
}

.prolite-cookies-table tbody tr:hover td {
    background: color-mix(in srgb, var(--prolite-primary) 5%, #fff);
}

.prolite-cookies-table strong {
    color: #252d3d;
    font-size: 15px;
}

.prolite-cookies-table code {
    display: block;
    margin-top: 5px;
    padding: 3px 6px;
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #515b6e;
    background: #f0f2f5;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.4;
}

.prolite-last-sync {
    margin-top: 13px;
    color: var(--prolite-muted);
    text-align: right;
    font-size: 13px;
}

.prolite-manage-consent {
    color: #fff;
    background: var(--prolite-gradient);
    border: 0;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--prolite-primary) 20%, transparent);
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 700px) {
    #pl-banner {
        right: 14px;
        bottom: 14px;
        left: 14px;
        width: auto;
        max-height: 90vh;
        padding: 21px;
        border-radius: 20px;
    }

    #pl-banner h2 {
        margin-right: 34px;
        margin-left: 34px;
        font-size: 19px;
    }

    #pl-shield {
        left: 15px;
        bottom: 60px;
        width: 43px;
        height: 43px;
    }

    .pl-actions {
        grid-template-columns: 1fr;
    }

    .pl-button-primary {
        grid-column: auto;
    }

    .pl-service {
        grid-template-columns: 1fr;
    }

    .prolite-table-wrap {
        overflow: visible;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .prolite-cookies-table {
        display: block;
        min-width: 0;
        font-size: 14px;
    }

    .prolite-cookies-table thead {
        display: none;
    }

    .prolite-cookies-table tbody,
    .prolite-cookies-table tr,
    .prolite-cookies-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .prolite-cookies-table tr {
        margin-bottom: 15px;
        overflow: hidden;
        background: #fff;
        border: 1px solid var(--prolite-table-border);
        border-radius: 13px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    }

    .prolite-cookies-table td,
    .prolite-cookies-table tbody tr:nth-child(even) td,
    .prolite-cookies-table tbody tr:hover td {
        position: relative;
        min-height: 45px;
        padding: 12px 12px 12px 41%;
        background: #fff;
        border: 0;
        border-bottom: 1px solid #eceff3;
        font-size: 14px;
    }

    .prolite-cookies-table td:last-child {
        border-bottom: 0;
    }

    .prolite-cookies-table td::before {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 34%;
        color: var(--prolite-primary);
        content: attr(data-label);
        font-weight: 750;
    }

    .prolite-policy-section > h3 {
        font-size: 20px;
    }
}

@media (max-width: 420px) {
    #pl-banner {
        padding: 18px;
    }

    .pl-category summary {
        font-size: 14px;
    }

    .prolite-cookies-table td,
    .prolite-cookies-table tbody tr:nth-child(even) td,
    .prolite-cookies-table tbody tr:hover td {
        padding-left: 12px;
        padding-top: 37px;
    }

    .prolite-cookies-table td::before {
        top: 10px;
        width: calc(100% - 24px);
    }
}
