#user-prefs-banner {
    display: none;
    position: fixed;
    bottom: calc(20px + var(--sticky-cta-mobile-offset, 0px));
    left: 20px;
    width: 300px;
    max-width: calc(100% - 40px);
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 99999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    contain: layout style paint;
}

#user-prefs-banner.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

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

.cookie-title {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cookie-text {
    font-size: 11px;
    line-height: 1.4;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cookie-inline-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 4px;
}

.cookie-actions {
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.btn-cookie {
    flex: 1;
    padding: 6px 0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: #1a1a1a;
    color: #fff;
    flex: 1.2;
}

.btn-cookie-accept:hover {
    background: #000;
}

.btn-cookie-reject {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-cookie-reject:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-cookie-settings {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-cookie-settings:hover {
    border-color: #d1d5db;
    color: #374151;
}

.btn-cookie-wide {
    width: auto;
    padding: 12px 30px;
}

.cookie-banner-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
}

#cookie-minimized {
    position: fixed;
    bottom: calc(80px + var(--sticky-cta-mobile-offset, 0px));
    left: 20px;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    border: 1px solid #f0f0f0;
    font-size: 20px;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    contain: layout style paint;
}

#cookie-minimized.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#cookie-minimized:hover {
    transform: scale(1.1) rotate(10deg);
}

.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.cookie-modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cookie-modal-title {
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.cookie-switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cookie-switch-row:last-child {
    border-bottom: none;
}

.cookie-switch-info h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.cookie-switch-info p {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.cookie-checkbox {
    width: 20px;
    height: 20px;
}

.cookie-modal-actions {
    margin-top: 20px;
    text-align: right;
}

.cookie-modal-policy {
    float: left;
    margin-top: 12px;
    font-size: 11px;
    color: #999;
    text-decoration: underline;
}

@media (max-width: 600px) {
    #user-prefs-banner {
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
        top: auto;
        bottom: calc(max(var(--sticky-cta-mobile-offset, 0px), 76px) + env(safe-area-inset-bottom) + 6px);
        padding: 8px 10px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    #user-prefs-banner .cookie-header {
        margin-bottom: 0;
        flex: 0 0 auto;
    }

    #user-prefs-banner .cookie-title {
        font-size: 12px;
        line-height: 1;
        white-space: nowrap;
    }

    #user-prefs-banner .cookie-banner-close {
        display: none;
    }

    #user-prefs-banner .cookie-text {
        display: none;
    }

    #user-prefs-banner .cookie-actions {
        margin: 0;
        flex: 1;
        justify-content: flex-end;
        gap: 4px;
    }

    #user-prefs-banner .btn-cookie {
        flex: 0 0 auto;
        min-width: 64px;
        padding: 7px 8px;
        font-size: 11px;
        border-radius: 6px;
    }

    #user-prefs-banner .btn-cookie-accept {
        min-width: 72px;
    }

    #cookie-minimized {
        top: auto;
        bottom: calc(max(var(--sticky-cta-mobile-offset, 0px), 76px) + env(safe-area-inset-bottom) + 20px);
        left: 10px;
    }
}
