:root {
    --cookie-primary: #9548FF;
    --cookie-primary-hover: #7a35d9;
    --cookie-accent: #E1FD66;
}

/* Cookie Banner - White bottom banner design */
#cookiescript_injected {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    color: #333333;
    padding: 24px 32px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 999998;
    display: none;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.cookiescript_banner_content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.cookiescript_left_content {
    flex: 1;
    max-width: calc(100% - 200px);
}

#cookiescript_header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333333;
    letter-spacing: 0.5px;
}

#cookiescript_description {
    font-size: 14px;
    color: #333333;
    line-height: 1.6;
    margin-bottom: 16px;
}

#cookiescript_description a {
    color: #9548FF;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

#cookiescript_preferences_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
}

.cookie-preference-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-preference-label {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

/* Cookie Toggle Styles */
.cookie-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle {
    width: 44px;
    height: 24px;
    background: #d6dae5;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
    cursor: pointer;
}

.cookie-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

/* Gray toggle for necessary (disabled) - always ON */
.cookie-switch input:disabled + .cookie-toggle {
    background: #adb2c2;
    cursor: not-allowed;
}

.cookie-switch input:disabled + .cookie-toggle::after {
    transform: translateX(20px);
}

/* Purple toggle for enabled categories */
.cookie-switch input:checked:not(:disabled) + .cookie-toggle {
    background: #9548FF;
}

.cookie-switch input:checked:not(:disabled) + .cookie-toggle::after {
    transform: translateX(20px);
}

#cookiescript_manage_wrap {
    display: inline-block;
    margin-top: 4px;
}

/* Details link elements */
#show_details,
#hide_details {
    color: #9548FF;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

#show_details:hover,
#hide_details:hover {
    text-decoration: underline;
}

/* Action Buttons - Vertical layout on the right */
#cookiescript_buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 160px;
}

#cookiescript_injected #cookiescript_buttons button {
    width: 100%;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid;
}

/* Allow all button - lime green background with purple text */
#cookiescript_injected #cookiescript_accept,
#cookiescript_injected #allow_all {
    background: #E1FD66;
    color: #9548FF;
    border-color: #E1FD66;
}

#cookiescript_injected #cookiescript_accept:hover,
#cookiescript_injected #allow_all:hover {
    background: #9548FF;
    color: #E1FD66;
    border-color: #9548FF;
}

/* Allow selection button */
#cookiescript_injected #cookiescript_allow_selection {
    background: #ffffff;
    color: #9548FF;
    border-color: #9548FF;
}

#cookiescript_injected #cookiescript_allow_selection:hover {
    background: #f8f5ff;
}

/* Deny button */
#cookiescript_injected #cookiescript_reject,
#cookiescript_injected #deny_all {
    background: #ffffff;
    color: #9548FF;
    border-color: #9548FF;
}

#cookiescript_injected #cookiescript_reject:hover,
#cookiescript_injected #deny_all:hover {
    background: #f8f5ff;
}

.cookiescript_hidden {
    display: none;
}

#cookiescript_cookietablewrap {
    position: fixed;
    inset: 0;
    padding: 32px 18px;
    background: rgba(1, 3, 8, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.cookiescript_modal {
    width: min(960px, 100%);
    background: #ffffff;
    color: #16181d;
    border-radius: 24px;
    padding: 32px 32px 20px;
    box-shadow: 0 25px 65px rgba(3, 4, 16, 0.35);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    position: relative;
    z-index: 999999;
}

.cookiescript_modal_tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e4e7ec;
    margin: 0;
}

.cookiescript_modal_tabs button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 18px;
    font-weight: 600;
    color: #7a7f8f;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cookiescript_modal_tabs button.active {
    color: #9548FF;
    border-color: #9548FF;
}

.cookiescript_modal_panel {
    display: none;
}

.cookiescript_modal_panel.is-active {
    display: block;
}

/* Consent Tab Styles */
.cookie-consent-content {
    padding: 24px 0;
}

.cookie-consent-title {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 16px;
    letter-spacing: 0.5px;
}

.cookie-consent-description {
    font-size: 14px;
    color: #333333;
    line-height: 1.6;
    margin: 0 0 24px;
}

.cookie-consent-description a {
    color: #9548FF;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.cookie-consent-description a:hover {
    color: #7a35d9;
}

.cookie-consent-categories {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding: 24px 0;
    border-top: 1px solid #e4e7ec;
    border-bottom: 1px solid #e4e7ec;
}

.cookie-consent-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-align: center;
}

.cookie-consent-category-label {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
}

/* Details Tab Styles */
.cookie-details-content {
    padding: 0;
}

.cookie-category-section {
    border-bottom: 1px solid #e4e7ec;
}

.cookie-category-section:last-child {
    border-bottom: none;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.category-expand-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.category-arrow {
    transition: transform 0.2s ease;
    color: #333;
    transform: rotate(-90deg);
}

.category-expand-btn[aria-expanded="true"] .category-arrow {
    transform: rotate(0deg);
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #f0f0f0;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.category-content {
    padding: 0 0 16px 36px;
}

.category-description {
    margin: 0;
    color: #333333;
    line-height: 1.6;
    font-size: 14px;
}

.no-cookies-message {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px 20px;
}

.no-cookies-message p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Provider Cards */
.provider-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.provider-card {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 16px 20px;
    background: #fff;
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.provider-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #666;
}

.provider-arrow {
    transition: transform 0.2s ease;
    color: #666;
}

.provider-expand-btn[aria-expanded="true"] + .provider-arrow,
.provider-card.expanded .provider-arrow {
    transform: rotate(180deg);
}

.provider-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9548FF;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.provider-link:hover {
    color: #7a35d9;
    text-decoration: underline;
}

.provider-link svg {
    flex-shrink: 0;
}

.provider-cookies {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e4e7ec;
}

.cookie-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-item .cookie-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.cookie-item .cookie-details {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.cookie-item .cookie-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Cookie Declaration Footer */
.cookie-declaration-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e4e7ec;
    font-size: 13px;
    color: #666;
}

.cookie-declaration-footer a {
    color: #9548FF;
    text-decoration: none;
    font-weight: 500;
}

.cookie-declaration-footer a:hover {
    text-decoration: underline;
}

.cookie-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cookie-switch label {
    font-size: 12px;
    color: #7f8596;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle {
    width: 44px;
    height: 24px;
    background: #d6dae5;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}

.cookie-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

/* Purple toggle for enabled categories when checked */
.cookie-switch input:checked:not(:disabled) + .cookie-toggle {
    background: #9548FF;
}

.cookie-switch input:checked:not(:disabled) + .cookie-toggle::after {
    transform: translateX(20px);
}

/* Gray toggle for disabled/necessary cookies - always show in ON position */
.cookie-switch input:disabled + .cookie-toggle {
    background: #adb2c2;
    cursor: not-allowed;
}

.cookie-switch input:disabled + .cookie-toggle::after {
    transform: translateX(20px);
}

.cookie-switch input:disabled:checked + .cookie-toggle {
    background: #adb2c2;
}

.cookie-switch input:disabled:checked + .cookie-toggle::after {
    transform: translateX(20px);
}

/* About Tab Styles */
.cookie-about-content {
    padding: 24px 0;
}

.cookie-about-content p {
    margin: 0 0 20px;
    color: #333333;
    line-height: 1.6;
    font-size: 14px;
}

.cookie-about-content p:last-child {
    margin-bottom: 0;
}

.cookie-about-content a {
    color: #9548FF;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.cookie-about-content a:hover {
    color: #7a35d9;
}

.cookiescript_modal_panel[data-panel="about"] ul {
    padding-left: 20px;
}

.cookiescript_modal_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    justify-content: flex-end;
}

.cookiescript_modal_actions button {
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid;
}

/* Deny button - white with purple border */
#cookiescript_reject_modal {
    background: #ffffff;
    color: #9548FF;
    border-color: #9548FF;
}

#cookiescript_reject_modal:hover {
    background: #f8f5ff;
}

/* Allow selection button - white with purple border */
#cookiescript_allow_selection_modal {
    background: #ffffff;
    color: #9548FF;
    border-color: #9548FF;
}

#cookiescript_allow_selection_modal:hover {
    background: #f8f5ff;
}

/* Allow all button - lime green with purple text */
#cookiescript_accept_modal {
    background: #E1FD66;
    color: #9548FF;
    border-color: #E1FD66;
}

#cookiescript_accept_modal:hover {
    background: #9548FF;
    color: #E1FD66;
    border-color: #9548FF;
}

.cookiescript_report {
    margin-top: 18px;
    font-size: 12px;
    color: #8b91a3;
    text-align: right;
}

@media (max-width: 768px) {
    /* Banner mobile styles */
    #cookiescript_injected {
        padding: 20px 24px;
    }

    .cookiescript_banner_content {
        flex-direction: column;
        gap: 20px;
    }

    .cookiescript_left_content {
        max-width: 100%;
    }

    #cookiescript_buttons {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    #cookiescript_injected #cookiescript_buttons button {
        width: 100%;
        padding: 14px 24px;
    }

    #cookiescript_preferences_wrap {
        flex-direction: column;
        gap: 16px;
    }

    .cookie-preference-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #e4e7ec;
    }

    .cookie-preference-item:last-child {
        border-bottom: none;
    }

    /* Modal mobile styles - full screen */
    #cookiescript_cookietablewrap {
        padding: 0;
        align-items: flex-end;
    }

    .cookiescript_modal {
        width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .cookiescript_modal_tabs {
        flex-shrink: 0;
        border-bottom: 2px solid #e4e7ec;
        padding: 0;
    }

    .cookiescript_modal_tabs button {
        flex: 1;
        padding: 16px 12px;
        font-size: 14px;
        border-bottom-width: 3px;
    }

    .cookiescript_modal_panel {
        flex: 1;
        overflow-y: auto;
        padding: 24px 20px;
    }

    .cookiescript_modal_panel.is-active {
        display: flex;
        flex-direction: column;
    }

    /* Consent tab mobile */
    .cookie-consent-content {
        padding: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .cookie-consent-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .cookie-consent-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .cookie-consent-categories {
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin-top: auto;
        border-top: 1px solid #e4e7ec;
        border-bottom: none;
    }

    .cookie-consent-category-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 16px 0;
        border-bottom: 1px solid #e4e7ec;
    }

    .cookie-consent-category-item:last-child {
        border-bottom: none;
    }

    .cookie-consent-category-label {
        font-size: 14px;
    }

    /* Details tab mobile */
    .cookie-details-content {
        padding: 0;
    }

    .category-header {
        padding: 16px 0;
    }

    .category-content {
        padding: 0 0 16px 24px;
    }

    .category-description {
        font-size: 14px;
    }

    .provider-card {
        padding: 12px 16px;
    }

    /* About tab mobile */
    .cookie-about-content {
        padding: 0;
    }

    .cookie-about-content p {
        font-size: 14px;
        margin-bottom: 16px;
    }

    /* Modal actions - fixed at bottom on mobile */
    .cookiescript_modal_actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 0;
        padding: 20px;
        background: #fff;
        border-top: 1px solid #e4e7ec;
        flex-shrink: 0;
    }

    .cookiescript_modal_actions button {
        width: 100%;
        padding: 14px 24px;
    }

    /* Reorder buttons: Allow all first, then Allow selection, then Deny */
    #cookiescript_accept_modal {
        order: 1;
    }

    #cookiescript_allow_selection_modal {
        order: 2;
    }

    #cookiescript_reject_modal {
        order: 3;
    }
}

@media (max-width: 480px) {
    #cookiescript_injected {
        padding: 16px 20px;
    }

    #cookiescript_header {
        font-size: 15px;
    }

    #cookiescript_description {
        font-size: 13px;
    }

    #cookiescript_injected #cookiescript_buttons button {
        padding: 12px 20px;
        font-size: 14px;
    }

    #cookiescript_manage_wrap {
        font-size: 13px;
    }

    .cookiescript_modal {
        max-height: 100vh;
        border-radius: 0;
    }

    .cookiescript_modal_tabs button {
        font-size: 13px;
        padding: 14px 10px;
    }

    .cookiescript_modal_panel {
        padding: 20px 16px;
    }

    .cookie-consent-title {
        font-size: 15px;
    }

    .cookie-consent-description {
        font-size: 13px;
    }

    .cookie-consent-category-label {
        font-size: 13px;
    }

    .cookie-consent-category-item {
        padding: 14px 0;
    }

    .category-name {
        font-size: 13px;
    }

    .category-description {
        font-size: 13px;
    }

    .category-content {
        padding-left: 20px;
    }

    .cookie-about-content p {
        font-size: 13px;
    }

    .cookiescript_modal_actions {
        padding: 16px;
    }

    .cookiescript_modal_actions button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

.btb {
    position: fixed;
    right: 24px;
    bottom: 25px;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.btb.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.btb:hover {
    transform: translateY(-4px) scale(1.05);
}

.btb svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .btb {
        right: 18px;
        bottom: 15px;
        width: 54px;
        height: 54px;
    }

    .btb svg {
        width: 22px;
        height: 22px;
    }
}

